Share via


How to: Access Settings Events

Settings events allow you to write code in response to changes in application- or user-scoped settings. Settings events include the following:

  • The SettingChanging event is raised before a setting's value is changed.

  • The PropertyChanged event is raised after a setting's value is changed.

  • The SettingsLoaded event is raised after the setting values are loaded.

  • The SettingsSaving event is raised before the setting values are saved.

For information on how to program using these events, see Accessing Application Settings (Visual Basic).

Settings events can be accessed from the Settings pane of the Project Designer.

To access settings events

  1. Select a project in Solution Explorer, and then on the Project menu, click Properties.

  2. Select the Settings pane.

  3. Click the View code button to open the Settings.vb or Settings.cs file in the Code Editor. This file defines methods that handle the events raised when user settings are changed, loaded, or saved.

See Also

Tasks

How to: Add or Remove Application Settings

Reference

My.Settings Object

ApplicationSettingsBase

Concepts

Application Settings

Accessing Application Settings (Visual Basic)

Other Resources

Managing Application Settings