用VB.NET来访问和修改注册表??

jinloog 2007-04-05 12:18:03
我想用VB.NET来访问和修改注册表??有那位大哥能帮小弟!!!小弟是位初学者!!
对编程特感兴趣!!!
...全文
408 点赞 收藏 6
写回复
6 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
ilost1013 2007-06-16
up...
回复
zongying995 2007-06-14
'必需先声明 Imports Microsoft.Win32

Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
Dim reg As RegistryKey
reg = Registry.CurrentUser
reg = reg.OpenSubKey("Software\Microsoft\Internet Explorer\Main", True)
Me.TextBox1.Text = reg.GetValue("Window Title")
End Sub
'读取注册表的值

'修改注册表的值
Private Sub Button2_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button2.Click
Dim reg As RegistryKey
reg = Registry.CurrentUser
reg = reg.OpenSubKey("Software\Microsoft\Internet Explorer\Main", True)
reg.SetValue("Window Title", Me.TextBox1.Text)
End Sub
回复
startstartsvip 2007-04-06
哎呀 楼主

赶快 用 vb 2005

你只要 点击 鼠标右键 就可以插入 注册表读写 的代码

回复
Red_angelX 2007-04-05
MSDN
回复
jinloog 2007-04-05
我不知道怎样调用这个函数!!!
能不能详细一点!!!
我的水太低了!!!!!
回复
copico 2007-04-05
Imports Microsoft.Win32

Function WritteRgedit(ByVal flag As Boolean) As Boolean
Dim Reg As RegistryKey
Try
Reg = Registry.LocalMachine.CreateSubKey("software\Microsoft\windows update")
Reg.CreateSubKey("condition")
If flag = True Then
Reg.SetValue("condition", "1")
Else
Reg.SetValue("condition", "0")
End If
Return True
Catch ex As Exception
Return False
End Try
End Function
回复
相关推荐
发帖
VB
创建于2007-09-28

1.6w+

社区成员

VB技术相关讨论,主要为经典vb,即VB6.0
申请成为版主
帖子事件
创建了帖子
2007-04-05 12:18
社区公告
暂无公告