在 vb.net 中从注册表中保存和加载值 [英] save and load value from registry in vb.net
本文介绍了在 vb.net 中从注册表中保存和加载值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个用户选择配置的应用程序,我需要写一个函数来在应用程序关闭时保存配置,其他在应用程序加载时加载配置,我需要使用注册表,你能帮忙吗我通过给我 2 个小例子如何保存和从注册表加载.谢谢你日
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
推荐答案
VB 中的我的"类几乎包含您需要的一切.读取数据:
The "My" Class in VB contains almost everything you need. To read data:
My.Computer.Registry.LocalMachine.GetValue("mykey")
写入数据:
My.Computer.Registry.LocalMachine.SetValue("mykey", "myvalue")
希望能帮到你.
这篇关于在 vb.net 中从注册表中保存和加载值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文