private void txbPassword_KeyPress(object sender, KeyPressEventArgs e) { //输入密码后按回车键直接登录 if (e.KeyChar == 13) { this.btn_Login.Focus(); this.btn_Login.PerformClick(); } }