private void Submenu_Login_Click(object sender, EventArgs e) { if (lgn == null) { lgn = new FormLogin(); lgn.MdiParent = this; lgn.FormClosed += new FormClosedEventHandler(lgn_FormClosed); lgn.Show(); } else { lgn.Activate(); } }
void lgn_FormClosed(object sender, FormClosedEventArgs e) { lgn = null; }