public MainForm() { Login lg = new Login(); if (lg.ShowDialog() != DialogResult.OK) { Environment.Exit(Environment.ExitCode); return; } else { InitializeComponent(); } }
this.DialogResult = DialogResult.OK