KeyDown event not Working on PrintScreen Key

后端 未结 4 768
没有蜡笔的小新
没有蜡笔的小新 2021-01-17 17:38

I am using C# windows Application

I am checking which key, user have pressed down by keyboard. I have checked for all keys but its not working in case of printScreen

4条回答
  •  醉梦人生
    2021-01-17 18:25

    The print-screen key is trapped by the OS before it is sent to applications. To detect such keys, you need to use a keyboard hook. You may be interested in this article: Low-level Windows API hooks from C# to stop unwanted keystrokes

提交回复
热议问题