Lily wrote:
How do you open a sequential file using OpenFile Dialog and read from it in .NET?
Also, how do you create an open file, write to it, and save it using SaveFileDialog in .NET?
I was trained using 6.0 and am unable to make the conversion to .NET.
From http://www.developmentnow.com/g/38_2...nguages-vb.htm
Posted via DevelopmentNow.com Groups
http://www.developmentnow.com
The OpenFileDialog and SaveFileDialog don't do any of the read/writing
to/from files. All it does is give you a new UI to let the user select
the name of the file. On the OpenFileDialog object you do something like:
Dim OFD as new OpenFileDialog
OFD.ShowDialog()
MessageBox.Show(OFD.Filename)
Then you will use the FileName method open your file for reading.
Look at the StreamReader/StreamWriter class to see how to read/write
from files.
Good Luck
Chris