private void btnThemMon_Click(object sender, EventArgs e) { var frm = new frmMonHoc(); if (Application.OpenForms[frm.Name] == null) { frm.Show(); } else { Application.OpenForms[frm.Name].Focus(); } }
private void btnMonHoc_ItemClick(object sender, ItemClickEventArgs e) { Form frm = this.KiemTraTonTai(typeof(frmMonHoc)); if (frm != null) { frm.Activate(); } else { frmMonHoc f = new frmMonHoc { MdiParent = this }; f.Show(); } }