Click here to Skip to main content
15,910,603 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionVb.net - multi user Pin
Silver-Grey2-Nov-06 4:48
Silver-Grey2-Nov-06 4:48 
AnswerRe: Vb.net - multi user Pin
Dave Kreskowiak2-Nov-06 7:24
mveDave Kreskowiak2-Nov-06 7:24 
GeneralRe: Vb.net - multi user Pin
Silver-Grey2-Nov-06 8:33
Silver-Grey2-Nov-06 8:33 
GeneralRe: Vb.net - multi user Pin
Dave Kreskowiak2-Nov-06 8:48
mveDave Kreskowiak2-Nov-06 8:48 
GeneralRe: Vb.net - multi user Pin
Silver-Grey2-Nov-06 11:36
Silver-Grey2-Nov-06 11:36 
AnswerRe: Vb.net - multi user Pin
Dave Sexton2-Nov-06 20:03
Dave Sexton2-Nov-06 20:03 
Questionprintpreview without 'generating document'-form Pin
Smithers-Jones2-Nov-06 4:20
Smithers-Jones2-Nov-06 4:20 
QuestionReading strings from binary files Pin
Ben Dessau2-Nov-06 4:20
Ben Dessau2-Nov-06 4:20 
using vb.net (2002) to read data from a binary file written by a legacy vb6 application (that I have the code for).

The data is of various types and is held in a structure.

I've simplified it below

Private Type QuoteInfo
sngCashOption As Single
... other variables of other types ...
strName as String
strAddress as string

End Type

Private muQuote As QuoteInfo

muQuote is then filled with data and then saved thus:

Open strFileName For Random As iFileNo Len = 500 ' Len(muQuote)
Put #iFileNo, miRECORD_NO, muQuote
Close iFileNo

Now the types aren't the same in vb6 and .NET - I've had to change Long in to Int32 and so on, but my problem is with strings

My .NET for reading it is:

Private Structure QuoteInfo
Public sngCashOption As Single
... other variables of other types ...
Public strName as String
Public strAddress as string
End Structure

Dim qi As New QuoteInfo()

Dim fs As FileStream = File.Open("filename", FileMode.Open)
Dim binRead As New BinaryReader(fs)

qi.sngCashOption = binRead.ReadSingle
... other variables of other types ...
qi.strName = binRead.ReadString
qi.strAddress = binRead.ReadString

And I get an 'System.IO.EndOfStreamException' when I try and read the second string. Any ideas? I guess strings are held differently.

Any ideas?

Thanks in Advance - Ben
QuestionWIERD PROBLEM!!!!!! Most of my textboxes cursor property is set to WAITCURSOR and will not let me change it!!!!! Pin
Joey Picerno2-Nov-06 4:17
Joey Picerno2-Nov-06 4:17 
AnswerRe: WIERD PROBLEM!!!!!! Most of my textboxes cursor property is set to WAITCURSOR and will not let me change it!!!!! Pin
Dave Kreskowiak2-Nov-06 7:14
mveDave Kreskowiak2-Nov-06 7:14 
GeneralRe: WIERD PROBLEM!!!!!! Most of my textboxes cursor property is set to WAITCURSOR and will not let me change it!!!!! Pin
Joey Picerno2-Nov-06 8:02
Joey Picerno2-Nov-06 8:02 
GeneralRe: WIERD PROBLEM!!!!!! Most of my textboxes cursor property is set to WAITCURSOR and will not let me change it!!!!! Pin
Dave Kreskowiak2-Nov-06 8:09
mveDave Kreskowiak2-Nov-06 8:09 
AnswerSolved!!!! Pin
Joey Picerno2-Nov-06 11:06
Joey Picerno2-Nov-06 11:06 
AnswerRe: WIERD PROBLEM!!!!!! Most of my textboxes cursor property is set to WAITCURSOR and will not let me change it!!!!! Pin
Guffa2-Nov-06 7:53
Guffa2-Nov-06 7:53 
QuestionRecent files in combobox Pin
johnjsm2-Nov-06 4:17
johnjsm2-Nov-06 4:17 
AnswerRe: Recent files in combobox Pin
Dave Kreskowiak2-Nov-06 7:05
mveDave Kreskowiak2-Nov-06 7:05 
AnswerRe: Recent files in combobox Pin
OldWarhorse4-Nov-06 2:21
OldWarhorse4-Nov-06 2:21 
Questiondata grid and odbc,plz help Pin
binujeesman2-Nov-06 3:13
binujeesman2-Nov-06 3:13 
AnswerRe: data grid and odbc,plz help Pin
nlarson112-Nov-06 3:40
nlarson112-Nov-06 3:40 
GeneralRe: data grid and odbc,plz help Pin
binujeesman3-Nov-06 19:24
binujeesman3-Nov-06 19:24 
QuestionHow to load other forms in a windows form ? Pin
kaiwnyt2-Nov-06 2:56
kaiwnyt2-Nov-06 2:56 
AnswerRe: How to load other forms in a windows form ? Pin
darkelv2-Nov-06 3:11
darkelv2-Nov-06 3:11 
GeneralRe: How to load other forms in a windows form ? Pin
kaiwnyt2-Nov-06 4:02
kaiwnyt2-Nov-06 4:02 
AnswerRe: How to load other forms in a windows form ? Pin
Yona Low2-Nov-06 3:17
Yona Low2-Nov-06 3:17 
GeneralRe: How to load other forms in a windows form ? Pin
kaiwnyt2-Nov-06 4:06
kaiwnyt2-Nov-06 4:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.