private void toolStripButton1_Click(object sender, EventArgs e) { if (CPO == null) { CPO = new CreatePurchaseOrder(); CPO.MdiParent = this; CPO.FormClosed += new FormClosedEventHandler(CPO_FormClosed); CPO.Show(); // this.Close(); } else { CPO.Activate(); } }
void CPO_FormClosed(object sender, FormClosedEventArgs e) { CPO = null; }