Nuevos Cambios
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user