It's like when they designed VB.Net they said VB6 is too straight foreward and simple let's complicate it as much as possible.
To read a record in a binary file in VB^ I would define a type with all the fields specifying strings as STRING * whatever the length of the field was.
For example:
Type Record
Field1 as string *15
Field2 to as string * 20
Field3 as String * 10
field4 as byte(10)
End Type
Dim filerecord as record
I would the open my binary fiel and do a
Get#1,, filerecord
The record would be read and all the fielsd would be in place.
Now with the new Structure we cant dimension an array in the Structure
And wjhen declaring strings we can't specify the length.
I tried to create structire and use a stream binary reader. and just read afixed number of bytes into the type, The program says it canvert bytes to my fiels.
So how do I do this. Or has Microsoft in their infinite wisdom left no way to do this.
To read a record in a binary file in VB^ I would define a type with all the fields specifying strings as STRING * whatever the length of the field was.
For example:
Type Record
Field1 as string *15
Field2 to as string * 20
Field3 as String * 10
field4 as byte(10)
End Type
Dim filerecord as record
I would the open my binary fiel and do a
Get#1,, filerecord
The record would be read and all the fielsd would be in place.
Now with the new Structure we cant dimension an array in the Structure
And wjhen declaring strings we can't specify the length.
I tried to create structire and use a stream binary reader. and just read afixed number of bytes into the type, The program says it canvert bytes to my fiels.
So how do I do this. Or has Microsoft in their infinite wisdom left no way to do this.