private void tbPwd_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { if (tbPwd.Text.Length == 0) { btLock.ImageIndex = 0; } else { if (Comun.AreUserAndPwdRight(Comun.GetUser(), tbPwd.Text)) { btLock.ImageIndex = 1; OnSignPwd(true); } else { btLock.ImageIndex = 2; OnSignPwd(false); } } } }