// スタートアップチェックの変更 void startupCheckBox_CheckedChanged(object sender, EventArgs e) { if (Visible) { if (startupCheckBox.Checked) { StartupLink.CreateStartup(Application.ExecutablePath); } else { StartupLink.RemoveStartup(Application.ExecutablePath); } } }
void UpdateStartupCheckbox() { startupCheckBox.Checked = StartupLink.Exists(Application.ExecutablePath); }