How to: Read Application Settings in Visual Basic
You can read a user setting by accessing the setting's property on the
My.Settings object exposes each setting as a property. The property name is the same as the setting name, and the property type is the same as the setting type. The setting's Scope indicates if the property is read-only; the property for an Application scope setting is read-only, while the property for a User scope setting is read-write. For more information, see My.Settings Object.
This example displays the value of the
Sub ShowNickname() MsgBox("Nickname is " & My.Settings.Nickname) End Sub
For this example to work, your application must have a
Nickname setting, of type
String. For more information, see Managing Application Settings (.NET).
How to: Change User Settings in Visual Basic
How to: Persist User Settings in Visual Basic
How to: Create Property Grids for User Settings in Visual Basic
Managing Application Settings (.NET)