private void TxtUsername_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { BtnLogin.PerformClick(); } }
private void txt_Password_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == Convert.ToChar(Keys.Enter)) { BtnLogin.PerformClick(); } }
private void TxtBxPass_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == (char)Keys.Enter) { BtnLogin.PerformClick(); } }
private void TextBox2_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { BtnLogin.PerformClick(); e.SuppressKeyPress = true; } }
// Login with Enter private void TxtJelszo_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == (char)Keys.Enter) { BtnLogin.PerformClick(); e.Handled = true; } }
private void txtpassword_KeyDown(object sender, KeyEventArgs e) { if (txtusername.Text.Trim().Length != 0 && txtpassword.Text.Trim().Length != 0 && e.KeyCode == Keys.Enter) { BtnLogin.Focus(); BtnLogin.PerformClick(); } }