private void sảnPhẩmToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (sp == null)
     {
         sp = new Sanpham_View();
         sp.StartPosition = FormStartPosition.CenterScreen;
         sp.WindowState   = FormWindowState.Maximized;
         sp.MdiParent     = this;
         sp.Show();
     }
     else
     {
         sp.Activate();
     }
 }
Example #2
0
        private void bbtSanpham_ItemClick(object sender, ItemClickEventArgs e)
        {
            Form frm = this.Kiemtratontai(typeof(Sanpham_View));

            if (frm != null)
            {
                frm.Activate();
            }
            else
            {
                Sanpham_View sp = new Sanpham_View();
                sp.MdiParent = this;
                //dmk.StartPosition = FormStartPosition.CenterParent;
                sp.WindowState = FormWindowState.Maximized;
                sp.Show();
            }
        }