加入收藏 | 设为首页 | 会员中心 | 我要投稿 厦门网 (https://www.xiamenwang.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长百科 > 正文

VB.Net实现开机启动程序

发布时间:2020-12-24 09:09:49 所属栏目:站长百科 来源:网络整理
导读:Private Sub Button1_Click(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles Button1.Click Dim Reg As Microsoft.Win32.RegistryKeyReg = Microsoft.Win32.Registry.CurrentUserReg.OpenSubKey("SoftwareMicrosoftWindowsCurrentVe

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("SoftwareMicrosoftWindowsCurrentVersionRun",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("SoftwareMicrosoftWindowsCurrentVersionRun",True)

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

Reg.Close()

End Sub

(编辑:厦门网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    热点阅读