如何在未聚焦时检测 keyPress? [英] How do I detect keyPress while not focused?

查看:12
本文介绍了如何在未聚焦时检测 keyPress?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当表单不是当前活动的应用程序时,我试图检测 Print Screen 按钮的按下情况.

I am trying to detect the Print Screen button press while the form is not the current active application.

如果可能,该怎么做?

推荐答案

是的,你可以,它叫做系统钩子",看看 .NET 中的全局系统挂钩.

Yes you can, it's called "System hooks", take a look at Global System Hooks in .NET.

这篇关于如何在未聚焦时检测 keyPress?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆