private void button1_Click(object sender, EventArgs e) { string Errores; Autentificacion auten = new Autentificacion(); login = (auten.autentificar(textBox1.Text, textBox2.Text, out Errores)); if (login == true) { if (a == null) { a = new Administradorprincipal(this); } if (a.IsDisposed) { a = new Administradorprincipal(this); } // th textBox1.Text = ""; textBox2.Text = ""; this.Visible = false; a.Show(); } else { MessageBox.Show("Credenciales incorrectas"); } }