Saving Values at Run Time

Errods

Well-known member
Joined
Dec 17, 2007
Messages
71
Location
Kundapur, Karnataka, Udupi, India.
Programming Experience
1-3
Hi All,

I want to Save a value in the Settings at runtime........ The value denotes the Last Form the user visited.....

I am doing it as follows

My.Settings.LasForm=FormName
'Where FormName is the variable whoose value must be stored in the variable LasForm. But when i Stop the Application ie Stop Debugging.... The value is not present in the Value field of that variable in the Settings page......

Is the way I am using wrong or its something else..........

Please HELP ME GUYS.........


THANKS in ADVANCE.............. :)
 
When you run the application setting are stored in a runtime configuration file. For first run these are based on the default values you have set in development. If you change a setting the runtime configuration file stores this value, they do not change the source code of application.
A similar situation would be if I installed Excel and changed a user setting, would this change Microsofts source code for Excel? (No :)) Debugging an application is no different in principle, the source code is built and deployed to for example Bin/Debug folder, and application is started. The difference is only VS attaches a debugger that enables you to break into source code and see what is happening during runtime.
 
Application settings are saved on application exit by default.
 
Back
Top