VB.Net实现开机启动程序
发布时间:2020-12-24 16:13:10 所属栏目:站长百科 来源:网络整理
导读: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 (编辑:威海站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |