Private Sub Button1_Click(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles Button1.Click 
Dim Reg As Microsoft.Win32.RegistryKey

Reg = Microsoft.Win32.Registry.CurrentUser

Reg.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Run",True)

Reg.SetValue("MB",Application.ExecutablePath)'写入注册表

Reg.Close()

End Sub


Private Sub Button2_Click(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles Button2.Click

Dim Reg As Microsoft.Win32.RegistryKey

Reg = Microsoft.Win32.Registry.CurrentUser

Reg.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Run",True)

Reg.Deletue("MB")'删除注册表键

Reg.Close()

End Sub

dawei

【声明】:北京站长网内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。