Пример #1
0
        private void btnThemKhoi_Click(object sender, EventArgs e)
        {
            var frm = new frmKhoilop();

            if (Application.OpenForms[frm.Name] == null)
            {
                frm.Show();
            }
            else
            {
                Application.OpenForms[frm.Name].Focus();
            }
        }
Пример #2
0
        private void btnKhoiLop_ItemClick(object sender, ItemClickEventArgs e)
        {
            Form frm = this.KiemTraTonTai(typeof(frmKhoilop));

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