如何将F12注册为热键? [英] How do I register F12 as a hotkey?

查看:104
本文介绍了如何将F12注册为热键?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在网上浏览,我没有找到任何帮助,我正在努力使F12成为我的程序的热键,即使表格不是焦点也可以使用。我希望按钮启动并停止计时器。当计时器没有运行时它将启动它,如果计时器正在运行,它将停止它。



提前感谢你的任何帮助。

I have been browsing online and I haven''t found any help, I am trying to make F12 a hotkey for my program that you can use even when the form isn''t in focus. I want the button to start AND stop the timer. It will start it when the timer isn''t running, and if the timer is running it will stop it.

Thank you for any help in advance.

推荐答案

您正在寻找全局键盘钩子。在C#和VB.NET中,网上有很多例子。
You''re looking for a "global keyboard hook". There''s a bunch of examples on the web in C# and VB.NET.


这篇关于如何将F12注册为热键?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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