Detailed vb.net operation Registry "Add, modify, Delete, query" method analysis

Source: Internet
Author: User
This article mainly introduced the VB.net operation registry method, combined with the example form analysis vb.net to the registry to add, modify, delete and query operation related implementation skills, need friends can refer to the next

The examples in this article describe how vb.net operates the registry. Share to everyone for your reference, as follows:

Increase:


Dim key as Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey ("Software/faxturer", True) Dim subkey as Microsoft.Win32.RegistryKeysubkey = 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)

Modify:


Dim key as Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey ("Software/faxturer", True) Reg. SetValue ("Path", "D:/software/sdf", Microsoft.Win32.RegistryValueKind.String)

Delete:


Dim key as Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey ("Software/faxturer", True) Key. DeleteSubKey ("Manu")

Inquire:


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.RegistryKeysubkey = RK. OpenSubKey ("Manu", False) MsgBox (RK. GetValue ("Path")) ' Registry root node MsgBox (subkey. GetValue ("Path")) ' Registry sub-node
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.