繁体中文
设为首页
加入收藏
当前位置:.Net技术首页 >> 文件IO >> 注册表操作

注册表操作

2004-10-01 08:26:10  作者:  来源:互联网  浏览次数:70  文字大小:【】【】【
简介:Public Sub SaveSettings()         Dim parentKey As Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("Software", True)...
关键字:注册表

Public Sub SaveSettings()

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

责任编辑:admin
相关文章