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

keys是按键的枚举类型

private void txtPropertyValue_KeyPress(object sender, KeyPressEventArgs e)
        {
            if ((Keys)e.KeyChar == Keys.Enter)
            {
                Save();
            }
        }

 

posted on 2014-06-13 10:33  吴培洪  阅读(814)  评论(0编辑  收藏  举报

导航