Beispiel #1
0
        private void btnThemNam_Click(object sender, EventArgs e)
        {
            var frm = new frmNamHoc();

            if (Application.OpenForms[frm.Name] == null)
            {
                frm.Show();
            }
            else
            {
                Application.OpenForms[frm.Name].Focus();
            }
        }
Beispiel #2
0
        private void btnNamHoc_ItemClick(object sender, ItemClickEventArgs e)
        {
            Form frm = this.KiemTraTonTai(typeof(frmNamHoc));

            if (frm != null)
            {
                frm.Activate();
            }
            else
            {
                frmNamHoc f = new frmNamHoc
                {
                    MdiParent = this
                };
                f.Show();
            }
        }