VB.NET检测主要preSS虽然最小化 [英] VB.NET Detecting Keypress While Minimized

查看:157
本文介绍了VB.NET检测主要preSS虽然最小化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望能够检测到当用户presses F10或我的程序按Ctrl + F10之外,并在接收到密钥preSS,将文本发送到无论他们当前选择(如文字框)。怎样才能在最简单的方法可能?

I want to be able to detect when the user presses F10 or Ctrl+F10 outside of my program, and upon receiving the key press, it will send text to whatever they currently have selected (e.g. a text box). How can this be accomplished in the simplest way?

推荐答案

使用的 RegisterHotkey ,而不是一个键盘钩子获取全局热键。

Use RegisterHotkey and not a keyboard hook to get a global hotkey.

在几乎相同的问题,见我的旧的答案之一:<一个href="http://stackoverflow.com/questions/5065817/listen-for-a-key-when-the-application-is-not-focused/5065906#5065906">listen因为当应用程序不集中

See one of my older answers on almost the same question: listen for a key when the application is not focused

这篇关于VB.NET检测主要preSS虽然最小化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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