|
-
May 23rd, 2007, 08:05 AM
#7
Lively Member
Re: [2005] Saving Settings and Loading Settings Help
Also notice that this is the easiest way to make your application fully customizable, just adding a propertygrid control and setting the my.settings object as the selectedobject for the propertygrid.
- Double Click on MyProject
- Select the 'Settings' tab
- Add all the settings you need by indicating:
- Name for the property
- Type (String, Color, Integer,ConnectionString...)
- Scope (The scope of the property: user/application)
- Value (The default value for this setting)
- Now you can add this properties to any control in your form:
- Click any control to select it
- In the propertygrid of the control go to:
(ApplicationSettings)>(PropertyBinding)
- Now select any property and bind it to one of the settings you created before.
- The last thing you have to do is adding a PropertyGrid to a form in your application and set:
VB Code:
PropertyGrid1.SelectedObject = My.Settings
Thats all. The user can change the values of the settings on the propertygrid and all the controls within the application bound to these settings will show the changes.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|