private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == '\r') //判断是否按下Enter键
button1.Focus(); //将鼠标焦点移到"查询"按钮上
}
C#:按下Enter键,自动执行Button1按钮
猜你喜欢
转载自www.cnblogs.com/sunnywam/p/11444078.html
今日推荐
周排行