欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

vb.net操作注冊(cè)表的方法分析【增加,修改,刪除,查詢(xún)】

 更新時(shí)間:2017年03月27日 10:47:31   作者:ITshu  
這篇文章主要介紹了vb.net操作注冊(cè)表的方法,結(jié)合實(shí)例形式分析了vb.net針對(duì)注冊(cè)表的增加,修改,刪除及查詢(xún)操作相關(guān)實(shí)現(xiàn)技巧,需要的朋友可以參考下

本文實(shí)例講述了vb.net操作注冊(cè)表的方法。分享給大家供大家參考,具體如下:

增加:

Dim key As Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("Software/Faxturer", True)
Dim subkey As Microsoft.Win32.RegistryKey
subkey = key.CreateSubKey("Manu")
subkey.SetValue("Path", "d:/software/sdf", Microsoft.Win32.RegistryValueKind.String)
'reg.SetValue("path", New String() {"d:/software/sdf","dfdf"}, Microsoft.Win32.RegistryValueKind.MultiString)

修改:

Dim key As Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("Software/Faxturer", True)
reg.SetValue("path", "d:/software/sdf", Microsoft.Win32.RegistryValueKind.String)

刪除:

Dim key As Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("Software/Faxturer", True)
key.DeleteSubKey("Manu")

查詢(xún):

Dim rk As Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("Software/ManuFaxturer", True)
Dim s As String() = rk.GetSubKeyNames()
Dim subkey As Microsoft.Win32.RegistryKey
subkey = rk.OpenSubKey("Manu", False)
MsgBox(rk.GetValue("Path"))'注冊(cè)表根節(jié)點(diǎn)
MsgBox(subkey.GetValue("Path"))‘注冊(cè)表子結(jié)點(diǎn)

希望本文所述對(duì)大家vb.net程序設(shè)計(jì)有所幫助。

相關(guān)文章

最新評(píng)論