从vb.net中的注册表中保存并加载值

jpr*_*est 2 vb.net registry

我有一个用户选择配置的应用程序,我需要写一个函数来保存配置,当应用程序关闭时,其他加载应用程序时加载应用程序,我需要使用注册表,你能通过给我帮助我我2小例子如何保存和从注册表加载.谢谢Jp

Moh*_*our 6

VB中的"我的"类几乎包含了您需要的所有内容.要读取数据:

My.Computer.Registry.LocalMachine.GetValue("mykey")
Run Code Online (Sandbox Code Playgroud)

要写数据:

My.Computer.Registry.LocalMachine.SetValue("mykey", "myvalue")
Run Code Online (Sandbox Code Playgroud)

希望能帮助到你.