VB.Net by API/Microsoft.Win32/RegistryValueKind

Материал из VB Эксперт
Перейти к: навигация, поиск

RegistryValueKind.MultiString

  
Option Strict On
Imports Microsoft.Win32
Public Module Tester
   Public Sub Main
      Dim regKey As RegistryKey
      Dim keyTop As RegistryKey = Registry.CurrentUser
      regKey = keyTop.OpenSubkey("Software\MyCompany\MyApp", True)
      If regKey Is Nothing Then
         regKey = keyTop.CreateSubKey("Software\MyCompany\MyApp")
      End If
      Dim binValue As Byte() = {&HF0, &HFF, &H12, &HE0, &H43, &HAC}
      Dim strngValue As String() = {"A", "B","C", "D"}
      "regKey.SetValue("WindowState", 0, RegistryValueKind.DWord)
      "regKey.SetValue("CustomWindowCaption", "Client Contact Management",RegistryValueKind.String)
      "regKey.SetValue("CustomPosition", binValue, RegistryValueKind.Binary)
      "regKey.SetValue("CustomLabels", strngValue, RegistryValueKind.MultiString)
   End Sub
End Module