示例#1
0
        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();
            }
        }
示例#2
0
        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();
            }
        }