Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

save and load value from registry in vb.net

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 Jp

like image 205
jprbest Avatar asked Sep 05 '25 13:09

jprbest


1 Answers

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

My.Computer.Registry.LocalMachine.GetValue("mykey")

To write data:

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

Hope it helps.

like image 115
Mohammad M. Ramezanpour Avatar answered Sep 09 '25 05:09

Mohammad M. Ramezanpour