private void tsMenuPriviledges_Click(object sender, EventArgs e) { if (priviledges == null) { priviledges = new frmPriviledges(); priviledges.MdiParent = this; priviledges.FormClosed += new FormClosedEventHandler(priviledges_FormClosed); priviledges.Show(); } else { priviledges.Activate(); priviledges.WindowState = FormWindowState.Normal; } }
void priviledges_FormClosed(object sender, FormClosedEventArgs e) { priviledges = null; }