private void tsPatientBill_Click(object sender, EventArgs e) { if (bill == null) { bill = new frmPatientBills(); bill.MdiParent = this; bill.FormClosed += new FormClosedEventHandler(bill_FormClosed); bill.Show(); } else { bill.Activate(); bill.WindowState = FormWindowState.Normal; } }
void bill_FormClosed(object sender, FormClosedEventArgs e) { bill = null; }