| |

VerySource

 Forgot password?
 Register
Search
View: 792|Reply: 2

VB multi-text file saving

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-3-23 18:30:01
| Show all posts |Read mode
Just learning VB, I am still a novice
Please master
The problem is this: I have 10 text boxes in my form for entering numbers, all of which are two digits. After the project is generated, these numbers are required to be saved automatically when closed, and loaded automatically when the next time it is opened.
Please heroes help out
Thank you!
Reply

Use magic Report

0

Threads

45

Posts

32.00

Credits

Newbie

Rank: 1

Credits
32.00

 China

Post time: 2020-7-6 15:15:01
| Show all posts
Using writer As StreamWriter = File.CreateText(filepath)
writer.WriteLine(content)
writer.WriteLine(content)
writer.Flush()
writer.Close()
End Using
Reply

Use magic Report

0

Threads

45

Posts

32.00

Credits

Newbie

Rank: 1

Credits
32.00

 China

Post time: 2020-7-6 15:30:01
| Show all posts
Read StreamReader usage is similar to check MSDN
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list