System.Windows.Input空间里有个"Key"类中提供了键盘上可能的键的枚举值,如:

private void textBox1_KeyDown(object sender, KeyEventArgs e)
{
if (e.Key == System.Windows.Input.Key.Enter)
MessageBox.Show(
"回车");
}

相关文章:

  • 2021-09-16
  • 2022-12-23
  • 2022-12-23
  • 2021-07-31
  • 2021-11-13
  • 2021-10-01
  • 2022-01-25
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-08
  • 2022-12-23
  • 2022-12-23
  • 2021-05-19
  • 2022-12-23
相关资源
相似解决方案