private void aBMClientesToolStripMenuItem_Click(object sender, EventArgs e) { if (abmClie == null) { abmClie = new frmCliente(); abmClie.MdiParent = this; abmClie.FormClosed += new FormClosedEventHandler(abmClie_FormClosed); abmClie.Show(); } else { abmClie.Activate(); } }
private void aBMClientesToolStripMenuItem_Click(object sender, EventArgs e) { if (abmClie == null) { //Enviamos la cadena de conexión como parámetro (string) abmClie = new frmCliente(cadenaBD); abmClie.MdiParent = this; abmClie.FormClosed += new FormClosedEventHandler(abmClie_FormClosed); abmClie.Show(); } else { abmClie.Activate(); } }
void abmClie_FormClosed(object sender, FormClosedEventArgs e) { abmClie = null; }