My.Settings
Events
My.Settings
provides some interesting events that allow understanding of what is happening behind the scenes. Here are the following four events:
• SettingChanging
, which is raised just before a setting value is changed
• PropertyChanged
, which is raised just after a setting value has been changed
• SettingsLoaded
, which is raised just after settings values are loaded
• SettingsSaving
, which is raised just before settings values are persisted to disk
To handle such events you simply need to double-click the Settings.vb file that is automatically added by Visual Studio when you define a custom setting. The file just contains a partial class definition for My.Settings
so that it makes it easier to write custom code without putting ...
Get Visual Basic® 2010 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.