private void tsMenuDoctors_Click(object sender, EventArgs e) { //this.Hide(); //Form a = this.ActiveMdiChild; //a.Show(); if (doctorReg == null) { doctorReg = new frmDoctorRegistration(); doctorReg.MdiParent = this; doctorReg.FormClosed += new FormClosedEventHandler(doctorReg_FormClosed); doctorReg.Show(); } else { doctorReg.Activate(); doctorReg.WindowState = FormWindowState.Normal; } }
void doctorReg_FormClosed(object sender, FormClosedEventArgs e) { doctorReg = null; }