.NET winform 的keypress事件中判断当用户按下的是哪个键

keys是按键的枚举类型

private void txtPropertyValue_KeyPress(object sender, KeyPressEventArgs e)
        {
            if ((Keys)e.KeyChar == Keys.Enter)
            {
                Save();
            }
        }
原文地址:https://www.cnblogs.com/wupeihong/p/3785357.html