private void RegisterInStartup(bool Checked)
{
RegistryKey registryValue= Registry.CurrentUser.OpenSubKey
("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);
if (Checked))
{
registryKey.SetValue("startupApplication", Application.ExecutablePath);
}
else
{
registryKey.DeleteValue("startupApplication");
}
}
In which place i write this coding
ReplyDeletecreate a windows application in visual studio. there you can use this code to add your application to start at the windows startup.
ReplyDelete