private void mnuViewProduct_Click(object sender, EventArgs e) { if (productForm != null) { productForm.Show(); } else { productForm = new ProductForm(); productForm.MdiParent = this; productForm.Dock = DockStyle.Fill; productForm.Show(); productForm.FormClosing += productForm_FormClosing; } }
public void productForm_FormClosing(object sender, FormClosingEventArgs e) { productForm = null; }