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