I need to be able to check one textbox and another one on keypress. If both textbox characters are over 4 characters then a button will become enabled. So far... I have....
private void txtUser_KeyPress(object sender, KeyPressEventArgs e)
{
if (txtUser.Text.Length >= 4 && txtUser.Text.Length < 20)
{
btnLogin.Enabled = true;
btnLogin.Image = iUltimate.Properties.Resources.lock_open;
}
else
{
btnLogin.Enabled = false;
btnLogin.Image = iUltimate.Properties.Resources._lock;
}
}
private void txtPass_KeyPress(object sender, KeyPressEventArgs e)
{
if (txtPass.Text.Length >= 4 && txtPass.Text.Length < 20)
{
btnLogin.Enabled = true;
btnLogin.Image = iUltimate.Properties.Resources.lock_open;
}
else
{
btnLogin.Enabled = false;
btnLogin.Image = iUltimate.Properties.Resources._lock;
}
}