private void btnAINewProduct_Click(object sender, EventArgs e) { Form addProductForm = new frmAddProduct(new ProductPresenter(), this); addProductForm.FormBorderStyle = FormBorderStyle.None; //set fill parent addProductForm.MdiParent = this.MdiParent; addProductForm.Dock = DockStyle.Fill; addProductForm.Show(); }
private void btnNewProduct_Click(object sender, EventArgs e) { //frmAddProduct frmAdd = new frmAddProduct(new ProductPresenter()); //frmAdd.ShowDialog(); Form frmAdd = new frmAddProduct(new ProductPresenter(), this); frmAdd.WindowState = FormWindowState.Maximized; frmAdd.FormBorderStyle = FormBorderStyle.None; frmAdd.MdiParent = this.MdiParent; frmAdd.Dock = DockStyle.Fill; frmAdd.Show(); }