private void tìmKiếmBệnhHạiChínhToolStripMenuItem_Click(object sender, EventArgs e) { foreach (Form form in Application.OpenForms) { if (form.GetType() == typeof(frmBHC)) { form.Close(); break; } } if ((Application.OpenForms["frmBHC"] as frmBHC) == null) { frmBHC frmBHCmn = new frmBHC(); frmBHCmn.Show(); } }
private void pictureBox4_Click(object sender, EventArgs e) { foreach (Form form in Application.OpenForms) { if (form.GetType() == typeof(frmBHC)) { form.Close(); break; } } if ((Application.OpenForms["frmBHC"] as frmBHC) == null) { frmBHC frmBHCmn = new frmBHC(); frmBHCmn.FormClosed += FrmBHCmn_FormClosed; frmBHCmn.Show(); } }