private void ManagerControler_FormClosing_1(object sender, FormClosingEventArgs e) { if (MessageBox.Show("Do you want exit?", "EXIT", MessageBoxButtons.YesNo) == DialogResult.No) { e.Cancel = true; } else { Dispose(true); this.Hide(); login l = new login(); l.ShowDialog(); } }