//boton adm private void btn1_Click(object sender, EventArgs e) { if (txtContraseña.Text.Trim() != "" && txtRegistro.Text.Trim() != "") { DataTable d = obu.pdatosADM(txtRegistro.Text, txtContraseña.Text); if (d.Rows.Count > 0) { if ((b2 == false) || (f1.IsDisposed)) { f1 = new FrmPrincipal_ADM(d); f1.Show(); b2 = true; } } limpiar(); this.Hide(); } else { MessageBox.Show("Completar los campos", "Error!!", MessageBoxButtons.OK, MessageBoxIcon.Information); } //--------------------------------------------------------------------------------- }