private void Login_Load(object sender, EventArgs e) { if (loginUI.QueryUser()) { return; } else { //Administrator admin = new Administrator(); //admin.ShowDialog(); //this.Close(); this.Hide(); UserWizard wizard = new UserWizard(true); if (DialogResult.OK == wizard.ShowDialog(this)) { this.Show(); } else { this.Close(); } } }