private void cadastrarClienteToolStripMenuItem_Click(object sender, EventArgs e) { if (telaCadastraCliente == null) { telaCadastraCliente = new Cadastra_cliente(); telaCadastraCliente.Show(); telaCadastraCliente.MdiParent = this; telaCadastraCliente.Disposed += new EventHandler(telaCadastraCliente_Disposed); } }
private void button2_Click(object sender, EventArgs e) { if (telaCadastraCliente == null) { telaCadastraCliente = new Cadastra_cliente(); telaCadastraCliente.Show(); telaCadastraCliente.MdiParent = this; telaCadastraCliente.Disposed += new EventHandler(telaCadastraCliente_Disposed); } }
void telaCadastraCliente_Disposed(object sender, EventArgs e) { telaCadastraCliente = null; }