Пример #1
0
 private void txtContrasena_KeyPress(object sender, KeyPressEventArgs e)
 {
     if ((int)e.KeyChar == (int)Keys.Enter)
     {
         BtnIngresar.PerformClick();
     }
 }
Пример #2
0
 private void Login_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         BtnIngresar.PerformClick();
         e.SuppressKeyPress = true;
     }
 }