Determine whether the application saves the user settings on exit.
The SaveMySettingsOnExit
property allows the user to change how the application saves settings, at run time. You can explicitly save setting changes by using the Save method of the My.Settings
object.
The changes to this property are not persisted when the application closes. To change the SaveMySettingsOnExit
property permanently, you must change the setting in the Project Designer:
To change the setting in the Project Designer |
1. Have a project selected in Solution Explorer. Click Properties on the Project menu. 2. Click the Application tab. 3. Select Save My.Settings on Shutdown. |
There are two types of application settings, based on scope:
- Application-scoped settings can be used for information such as a URL for a web service or a database connection string. These values are associated with the application. Therefore, users cannot change them at run time.
- User-scoped settings can be used for information such as persisting the last position of a form or a font preference. Users can change these values at run time.
The path that store My.Settings config file differ depends upon the scope that has selected and the Visual Studio version. For Microsoft Visual Studio 2008 Version 9.0.30729.4462 QFE, the config is stored in:
C:\Users\<username>\AppData\Local\<companyname>\<appdomainname>_<eid>_<hash>\<version>\user.config
Source:-
- https://stackoverflow.com/questions/8691858/where-are-my-settings-saved-in-vb-2010-net#:~:text=They%27re%20definitely%20not%20stored,in%20the%20%25AppData%25%20folder.
- https://docs.microsoft.com/en-us/dotnet/visual-basic/developing-apps/programming/app-settings/how-to-read-application-settings
- https://docs.microsoft.com/en-us/dotnet/api/microsoft.visualbasic.applicationservices.windowsformsapplicationbase.savemysettingsonexit?view=netframework-4.8
- https://docs.microsoft.com/en-us/visualstudio/ide/managing-application-settings-dotnet?view=vs-2019