A1VBCode Forums

save and open file


http://www.a1vbcode.com/vbforums/Topic7517.aspx

By mell - 1/12/2005

hi guys,
can anybody help me to solve my problems?
i'm new in vb .net and need your suggestions...

how to save the contains of the listbox and how to open that contains back again in that list box.
and what file extension it is used to save that type of file?

i'm doing my final project now and need your reply as soon as possible..

thx in advanced
By Jim.S - 2/1/2005

Mell:

I'm not too sure about the saveFileDialog function off the top of my head, but its probably not what you need.  The textbox will be the same as the listbox, all you are doing is capturing the data that is in the object and writing it to a file.  The type of object is not important, only the data.  Also, basic file IO operations don't have anything to do with databases, they are more simple than that.

 

cmos:

As for your issue, try assigning a value to your filenumber variable, or just use a solid value instead of a variable.  For example:

FileSystem.FileOpen(1, "d:\to\tteste.txt", OpenMode.Output)

FileSystem.PrintLine(1, "ssss 1")

Give that a shot.

Jim