Where to store user settings in a window application?

M

Mazdonat

Where should I store user settings in a window application? For instance,
states of checkboxes in some kind of a "options menu", (hashed) password,
login, etc, etc...
I googled a lot and i found proposals with a storage in registry as well as
with the storage in a generated file (.xml or .ini?).
What is the best solution?

Thanks in advance.
 
R

Rick

Check Application.Settings. You can specify a property and then bind it to
a control property like a checkbox or textbox. An optional setting saves any
changes when you close the application. - Very easy to use.

Rick
 
O

onofftopic

Check Application.Settings.  You can specify a property and then bind it to
a control property like a checkbox or textbox. An optional setting saves any
changes when you close the application. - Very easy to use.

Rick

Nice advice!
At this way the data is stored into a .exe.config-file (xml-format)
automatically?
 
P

Pavel Minaev

Nice advice!
At this way the data is stored into a .exe.config-file (xml-format)
automatically?

Yes, except that it goes into the user profile (Documents and Settings
\<username>\Application Data), under a subdirectory with name derived
from your application name. You can also designate some properties in
the Settings Designer as global, in which case they'll actually go
into your .exe.config (but then of course a non-admin user won't be
able to change them).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top