在窗体加载事件里面加入下述代码:
//设置开机自启动 RegistryKey registryKey = Registry.CurrentUser.OpenSubKey ("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true); registryKey.SetValue("CameraVision",Application.ExecutablePath);
2022-06-06 22:48:28
在窗体加载事件里面加入下述代码:
//设置开机自启动 RegistryKey registryKey = Registry.CurrentUser.OpenSubKey ("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true); registryKey.SetValue("CameraVision",Application.ExecutablePath);