private void excluirProdutoToolStripMenuItem_Click(object sender, EventArgs e) { if (telaExcluirProduto == null) { telaExcluirProduto = new Excluir_Produto(); telaExcluirProduto.Show(); telaExcluirProduto.MdiParent = this; telaExcluirProduto.Disposed += new EventHandler(telaExcluirProduto_Disposed); } }
void telaExcluirProduto_Disposed(object sender, EventArgs e) { telaExcluirProduto = null; }