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; } }
private void login_Load(object sender, EventArgs e) { BtnIngresar.Focus(); }
public LoginPage ClickIngresar() { BtnIngresar.Click(); Console.WriteLine("Click ingresar."); return(this); }