keys是按键的枚举类型
private void txtPropertyValue_KeyPress(object sender, KeyPressEventArgs e) { if ((Keys)e.KeyChar == Keys.Enter) { Save(); } }
.NET winform 的keypress事件中判断当用户按下的是哪个键
时间: 2024-10-29 19:06:39
keys是按键的枚举类型
private void txtPropertyValue_KeyPress(object sender, KeyPressEventArgs e) { if ((Keys)e.KeyChar == Keys.Enter) { Save(); } }
.NET winform 的keypress事件中判断当用户按下的是哪个键