private void btnAdd_Click(object sender, EventArgs e)
        {
            FormAddProduct objFormAddProduct = new FormAddProduct();

            objFormAddProduct.ShowInTaskbar = false;
            objFormAddProduct.ShowDialog();
            btnQuery.PerformClick();
        }
예제 #2
0
 private void btnAddProduct_Click(object sender, EventArgs e)
 {
     if (objFormAddProduct == null)
     {
         objFormAddProduct = new Product.FormAddProduct();
         CreateForm(objFormAddProduct);
     }
     else
     {
         objFormAddProduct.Activate();                           //激活最小化的窗体
         objFormAddProduct.WindowState = FormWindowState.Normal; //让最小化的窗体正常显示
     }
     SetFormStartPosition(objFormAddProduct);
 }