VB.Net : Read Settings in WinForm

To read settings in a VB.NET WinForm application, you can use the My.Settings object. My.Settings is a strongly typed class that provides access to the settings defined in the project’s Settings.settings file.

Here’s an example of how you can use My.Settings to read a setting:

Dim settingValue As String = My.Settings.SettingName

My.Settings.SettingName = “NewValue”
My.Settings.Save()

Note that you need to call the Save method after changing a setting value to persist the change.

Scroll to Top