The easiest way is to use the Microsoft.VisualBasic namespace and the
SaveSetting / GetSetting methods.

Signature
Bob Powell [MVP]
Visual C#, System.Drawing
Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
> Where is the best place to put some code to load my form's controls
> parameters from the registry, and to save them to registry ?
[quoted text clipped - 11 lines]
> (same question would apply for calling serialize() and deserialize() )
> thanks
palaga - 27 Dec 2004 07:56 GMT
I have no problem reading from or writing to the registry or knowing where
to write/read in the registry. All I would like to know is what is the best
moment to do it !
is there an event in the form that I can use to load or save settings ?
If I save settings after the Run( ) method returns, it is to late ! so When
should I load / save settings ?
> The easiest way is to use the Microsoft.VisualBasic namespace and the
> SaveSetting / GetSetting methods.
[quoted text clipped - 16 lines]
>> (same question would apply for calling serialize() and deserialize() )
>> thanks
Bob Powell [MVP] - 27 Dec 2004 11:32 GMT
Ahh I see. Generally you can load and save at any time. Even read from the
registry when you need to read a value. If you have a lot of user
preferences though you might wish to get them in the OnLoad override of the
main form and save all the settings in the Closing or Closed event.

Signature
Bob Powell [MVP]
Visual C#, System.Drawing
Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
> I have no problem reading from or writing to the registry or knowing where
> to write/read in the registry. All I would like to know is what is the best
[quoted text clipped - 23 lines]
> >> (same question would apply for calling serialize() and deserialize() )
> >> thanks
palaga - 27 Dec 2004 21:36 GMT
ok, thanks !
> Ahh I see. Generally you can load and save at any time. Even read from the
> registry when you need to read a value. If you have a lot of user
[quoted text clipped - 37 lines]
>> >> (same question would apply for calling serialize() and deserialize() )
>> >> thanks