private void login_btn_Click(object sender, EventArgs e) { Forms.LoginForm loginForm = new Forms.LoginForm(); loginForm.VisibleChanged += delegate(object source, EventArgs args) { if (!loginForm.Visible) { this.Show(); } }; loginForm.Show(); }
private void formMain_Shown(object sender, EventArgs e) { Forms.LoginForm loginForm = new Forms.LoginForm(); loginForm.Show(this); }