private void btl2_Click_1(object sender, EventArgs e) { Form frm = frmMain.ActiveForm; foreach (Form f in frm.MdiChildren) { if (f.Name == "frmGiangVien") { f.Activate(); return; } } Form frmGV = new frmGiangVien(); frmGV.MdiParent = this; //Closeform("frmGiangVien"); frmGV.Show(); frmGV.Top = 0; frmGV.Left = 0; }
private void mnuGV_Click(object sender, EventArgs e) { Form frm = frmMain.ActiveForm; foreach (Form f in frm.MdiChildren) { if (f.Name == "frmGiangvien") { f.Activate(); return; } } frmGiangVien frm1 = new frmGiangVien(); frm1.MdiParent = this; //Closeform("frmQLSV"); frm1.Show(); frm1.Top = 0; frm1.Left = 0; }