private void tsPatientInvoice_Click(object sender, EventArgs e) { if (invoice == null) { invoice = new frmPatientInvoice(); invoice.MdiParent = this; invoice.FormClosed += new FormClosedEventHandler(invoice_FormClosed); invoice.Show(); } else { invoice.Activate(); invoice.WindowState = FormWindowState.Normal; } }
void invoice_FormClosed(object sender, FormClosedEventArgs e) { invoice = null; }