private void txtContrasena_KeyPress(object sender, KeyPressEventArgs e) { if ((int)e.KeyChar == (int)Keys.Enter) { BtnIngresar.PerformClick(); } }
private void Login_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { BtnIngresar.PerformClick(); e.SuppressKeyPress = true; } }