By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,262 Members | 1,161 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,262 IT Pros & Developers. It's quick & easy.

Creating Application Settings Using the Designer?

P: n/a
How do I persist properties bound to application settings in the VS 2005

I am binding form and control properties to application settings using VS
2005, as explained in MSDN:

Everything works fine, except my properties won't persist. The MSDN article
explains that "in languages other than Visual Basic, you must explicitly
call the Save method of this wrapper class in order to persist the user
settings." That means the class has to be instantiated, but the VS designer
doesn't appear to do that. So, how can I get to the Save() method?

Does the designer create the object I need? What is it called? Where do I
find the code that creates the object? Thanks in advance for your help.

David Veeneman
Foresight Systems
Nov 17 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
I found the answer. The Settings class is a static class with one property,
Default. The Save() method belongs to the Default property. The form's
designer code contains bindings that attach form and control property
settings to application settings using that Default property.

The only problem that I'm having now is that the user settings saved when my
application closes become the design-time setting for the bound controls and
form. That isn't always what I want. It may be just as easy to skip using
the Settings class and go back to writing my user settings from a custom
Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.