private void pesquisarProdutosToolStripMenuItem_Click(object sender, EventArgs e) { if (telaPesquisarProduto == null) { telaPesquisarProduto = new Pesquisar_Produtos(); telaPesquisarProduto.Show(); telaPesquisarProduto.MdiParent = this; telaPesquisarProduto.Disposed += new EventHandler(telaPesquisarProduto_Disposed); } }
void telaPesquisarProduto_Disposed(object sender, EventArgs e) { telaPesquisarProduto = null; }