注册表操作
来源:岁月联盟
时间:2003-07-12
Dim parentKey As Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("Software", True)
Dim key As Microsoft.Win32.RegistryKey = parentKey.OpenSubKey(mcApplicationName, True)
If key Is Nothing Then
key = parentKey.CreateSubKey(mcApplicationName)
End If
With key
.SetValue("Host Name", Me.HostNameEntry.Text)
.SetValue("Host Port", Me.HostPortEntry.Text)
.SetValue("User Name", Me.UserNameEntry.Text)
.SetValue("User Password", Me.UserPasswordEntry.Text)
End With
End Sub