Nuevos Cambios

This commit is contained in:
Michael Robles
2024-01-03 22:14:24 -07:00
parent 55ae2ea079
commit 0bb28bfcf6
24 changed files with 248 additions and 483 deletions
+29
View File
@@ -17,8 +17,23 @@ namespace compabetov2
public login()
{
InitializeComponent();
txtusuario.TextChanged += Txt_TextChanged;
txtcontraseña.TextChanged += Txt_TextChanged;
}
private void Txt_TextChanged(object sender, EventArgs e)
{
// Verificar si hay al menos 2 caracteres en ambos TextBox
if (txtusuario.Text.Length >= 2 && txtcontraseña.Text.Length >= 2)
{
button1.Enabled = true; // Habilitar el botón
}
else
{
button1.Enabled = false; // Deshabilitar el botón
}
}
private void panel2_Paint(object sender, PaintEventArgs e)
{
@@ -72,7 +87,21 @@ namespace compabetov2
private void login_Load(object sender, EventArgs e)
{
button1.Enabled = false;
}
private void txtusuario_TextChanged(object sender, EventArgs e)
{
if (txtusuario.Text.Length >= 2 && txtcontraseña.Text.Length >= 2)
{
button1.Enabled = true; // Habilitar el botón
}
else
{
button1.Enabled = false; // Deshabilitar el botón
}
}
}