protected override void OnClosed(EventArgs e) { // Just in case we forgot to save the settings before… Settings.Default.Save(); base.OnClosed(e); }