private void btnOkay_Click(object sender, EventArgs e) { if (!WindowsUtility.StartApplicationWithWindows(Application.ProductName, settingsManager.Settings.StartWithWindows)) { settingsManager.Settings.StartWithWindows = false; } settingsManager.Save(); DialogResult = DialogResult.OK; }