亚洲欧洲国产欧美一区精品,激情五月亚洲色五月,最新精品国偷自产在线婷婷,欧美婷婷丁香五月天社区

      考試首頁 | 考試用書 | 培訓(xùn)課程 | 模擬考場 | 考試論壇  
        當(dāng)前位置:編程開發(fā) > DotNET > VB.Net > 文章內(nèi)容
        

      vb.net操作注冊表的方法分析【增加,修改,刪除,查詢】

       [ 2017年8月7日 ] 【

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

      增加:

      1
      2
      3
      4
      5
      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)

      修改:

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

      刪除:

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

      查詢:

      1
      2
      3
      4
      5
      6
      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"))'注冊表根節(jié)點(diǎn)
      MsgBox(subkey.GetValue("Path"))‘注冊表子結(jié)點(diǎn)

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

      將考試網(wǎng)添加到收藏夾 | 每次上網(wǎng)自動訪問考試網(wǎng) | 復(fù)制本頁地址,傳給QQ/MSN上的好友 | 申請鏈接 | 意見留言 TOP
      關(guān)于本站  網(wǎng)站聲明  廣告服務(wù)  聯(lián)系方式  站內(nèi)導(dǎo)航  考試論壇
      Copyright © 2007-2013 中華考試網(wǎng)(Examw.com) All Rights Reserved