按键按下其他程序的任何位置 [英] Key press anywhere on the other programs

查看:44
本文介绍了按键按下其他程序的任何位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好抱抱对不好的英语:)我在使用vb.net制作程序时遇到问题我需要程序执行此操作时按(z)程序按(0)(退出)(退格)(输入)我知道怎么做但是!我必须选择我的程序才能工作当我按(z)任何地方时我需要它工作,谢谢:)

hi all fist sorry for bad English :) I have a problem in making a program with vb.net I need the program do this when I press (z) the program press (0) (Escape) (backspace) (enter) I know how to make it but! I must select my program to work I need it to work when I press (z) anywhere thanks :)

推荐答案

我认为你必须实现一个键盘全局钩子。 Google帮助 [ ^ ]。
I think you have to implement a keyboard global hook. Google helps[^].


另一种选择到Global Hooks就是使用Windows Raw Input API。

你可以用这篇文章作为起点:

使用来自C#的原始输入来处理多个键盘 [ ^ ]
An alternative to Global Hooks is to use Windows Raw Input API.
You can use this article as a starting point:
Using Raw Input from C# to handle multiple keyboards[^]


这篇关于按键按下其他程序的任何位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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