private void mnuManageState_Click(object sender, EventArgs e) { if (objStateForm == null) { objStateForm = new StateForm(); objStateForm.MdiParent = this; objStateForm.Show(); objStateForm.FormClosing += objStateForm_FormClosing; } else { objStateForm.Activate(); } }
void objStateForm_FormClosing(object sender, FormClosingEventArgs e) { objStateForm = null; }