Saving user prefs, form position, etc

V

VS Noob

Hello. I'm developing Windows.Forms based applications,
and each will need per-user persistent data consisting of user
preferences, last form size/position, and the like. Is there a
standard or recommended approach to this?

I'm aware that such data is often stored in an appropriate
HKCU\Software subkey and/or Application Data subfolder.
What I haven't figured out yet is if there is some convenient
..Net component or mechanism which automates and simplifies
the task.

For example, it would be sweet if common mechanism was
available to the Application and Form classes. You could set
an application property that specifies how/where to store the
data (registry or app data for example), and set a form
property specifying whether you want it to remember its last
position/size. Then everything would be automagic. If you
could add other auto-serialize objects to an application or
form class, that could be used for preferences and stuff.

OK, I'm getting ahead of myself. But you get the idea of
what I'm hoping to find... something other than a Registry
class ;-)
 
V

VS Noob

VS Noob said:
Hello. I'm developing Windows.Forms based applications,
and each will need per-user persistent data consisting of user
preferences, last form size/position, and the like. Is there a
standard or recommended approach to this?

-snip-

Thanks for the replies to my message. You guys gave me plenty
to look at and I greatly appreciate your sharing the info :)

I've gathered up the links you gave me, plus some other ones I
came across, and I'll include them here in case someone else
searches for similar info in the future.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/cmab.asp
http://www.palmbytes.de/content/dotnetlibs/optionslib.htm
http://www.codeproject.com/dotnet/savior.asp
http://www.c-sharpcorner.com/Code/2002/Mar/SavingNRestoringWinJM.asp

http://www.devx.com/dotnet/Article/11616
http://www.ondotnet.com/pub/a/dotnet/2003/01/01/configsections.html
http://www.codeproject.com/cs/miscctrl/RealPosition.asp
http://www.codeproject.com/csharp/ReadWriteXmlIni.asp
http://www.codeproject.com/csharp/Placement.asp
http://www.codeproject.com/csharp/app_config.asp
http://www.codeproject.com/csharp/xml_serializationasp.asp
 

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