mcapone888
New member
- Joined
- Mar 15, 2003
- Messages
- 2
Hi everyone,
I am new to VB.net, and have only played around with VB6 as a hobby. I know this is not the best way to write and read from a file, but this is what I used in the past, and it worked great for me.
I am trying to write some variables to a simple text file, and then be able to use load them again at a later time. In VB 6 I used:
for saving (writing):
Open App.Path & "\file.txt" For Output As #1
Write #1, String1, String2, Integer1
Close #1
for loading (reading):
Open App.Path & "\file.txt" For Input As #1
Input #1, String1, String2, Integer1
Close #1
This wrote the three variables to a simple text file found in the same location as the startup path of the program. How can I recreate this same simple code for a VB.Net windows application? If possible, please let me know the easiest way to do this, even if it is not the correct or best method possible. Thanks!!
Michael
I am new to VB.net, and have only played around with VB6 as a hobby. I know this is not the best way to write and read from a file, but this is what I used in the past, and it worked great for me.
I am trying to write some variables to a simple text file, and then be able to use load them again at a later time. In VB 6 I used:
for saving (writing):
Open App.Path & "\file.txt" For Output As #1
Write #1, String1, String2, Integer1
Close #1
for loading (reading):
Open App.Path & "\file.txt" For Input As #1
Input #1, String1, String2, Integer1
Close #1
This wrote the three variables to a simple text file found in the same location as the startup path of the program. How can I recreate this same simple code for a VB.Net windows application? If possible, please let me know the easiest way to do this, even if it is not the correct or best method possible. Thanks!!
Michael