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