private void tsMenuPatients_Click(object sender, EventArgs e) { if (patientReg == null) { patientReg = new frmPatientRegistration(); patientReg.MdiParent = this; patientReg.FormClosed += new FormClosedEventHandler(patientReg_FormClosed); patientReg.Show(); } else { patientReg.Activate(); patientReg.WindowState = FormWindowState.Normal; } }
void patientReg_FormClosed(object sender, FormClosedEventArgs e) { patientReg = null; }