Hello, I am looking for an easy way to save the value of a variable when a program is closed. And then when it is reopened the variable has the same value as what it was previously when the program was closed. The variable has an integer value. Any help appreciated! Thanks.
2 Replies - 119 Views - Last Post: 08 February 2012 - 01:29 PM
Topic Sponsor:
#1
Saving the value of a variable when program is closed
Posted 08 February 2012 - 07:07 AM
Replies To: Saving the value of a variable when program is closed
#3
Re: Saving the value of a variable when program is closed
Posted 08 February 2012 - 01:29 PM
Go to My Project -> Settings and add a new item named myInteger. Set the Data Type to Integer from the ComboBox. Set the value to 0.
Now in your project, refer to it programmatically like this:
Which sets that value to 48 and saves it for next time.
Now in your project, refer to it programmatically like this:
My.Settings.myInteger = 48
Which sets that value to 48 and saves it for next time.
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote




|