Is there a way to save values of variables (aside from storing values in a db or txt file) when a VB app closes such that when it is run again, the defaults are what was saved the last time the program was used.
Printable View
Is there a way to save values of variables (aside from storing values in a db or txt file) when a VB app closes such that when it is run again, the defaults are what was saved the last time the program was used.
You have to use some kind of external "data-keeper" like db, txt, ini or Registry (which I would strongly recommend). There is no other way to make the vb remember the values of variables (none that I know of at least and I'm 99.9% sure I'm right :cool: )
Saving the variables into the registry will be more suitable for you if you dun want to save into files. I did a small screensaver program before and use the registry to save the settings changes made by the user.
Try to look into this 2 functions:
GetSetting()
SaveSetting()
Hope this helps...