-
Saving problem...
I got a text box with a number in it (i.e. 271).
When the user clicks a command button +1 is added to the number in the text box (i.e. 272), and the program closes.
When I load up the program again the number is the same (i.e. 271).
How do I make it save the new number so once the user loads up the program again its 272 and not 271, 273 and not 274, etc...
-
Re: Saving problem...
From where does the initaila value (271) come from?
Where do you save this value? DB, File , Registry?
Please post some code also.
:wave:
-
Re: Saving problem...
You need to write out the textbox contents upon program close. Write it to either the registry, ini file or a textfile. Then upon opening of your app you read the location and populate your textbox.
-
Re: Saving problem...
The initial number is in a text box.
I'm planning on saving it into a .txt file. But how can it just save the latest number into the .txt file then once its opened it opens the .txt file with the number.
While typing all this I think i figured it out :)
-
Re: Saving problem...
yes, you typed the answer
-
Re: Saving problem...
I hope that your problem is resolved now. So you can mark the thread resolved if it is ;)
And you can use text file or and INI file to do your work. Here are some tutorials in the Forums.
http://www.vbforums.com/showthread.php?t=349993
http://www.vbforums.com/showthread.php?t=342619
http://www.vbforums.com/showthread.php?t=348141#file
:wave: