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