jprbest jprbest - 2 years ago 158 Question

save and load value from registry in

I have an application where the user select configuration, I need to write to function one to save the configuration when the application is closed and other load the configuration when the application is loaded, i need to use registry would you able to help me by giving me 2 small example how to save and to load from the registry.
thank you

Answer Source

The "My" Class in VB contains almost everything you need. To read data:


To write data:

My.Computer.Registry.LocalMachine.SetValue("mykey", "myvalue")

Hope it helps.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download