private void addPersonToolStripMenuItem_Click(object sender, EventArgs e) { if (apForm == null) { apForm = new AddPerson { MdiParent = this }; apForm.FormClosed += new FormClosedEventHandler(apForm_FormClosed); apForm.Show(); } else { apForm.Activate(); } }
private void apForm_FormClosed(object sender, FormClosedEventArgs e) { apForm = null; }