如何使当你按下回车键,可以捕获所有点击一个应用程序,但在我的WinForm的呢? [英] How to make an application that can capture all click when you press the Enter key, but in my WinForm as well?

查看:255
本文介绍了如何使当你按下回车键,可以捕获所有点击一个应用程序,但在我的WinForm的呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试开发谁做的截图所有鼠标点击一个应用程序,当我命中关键输入的制作教程,但我看不出如何抓住这个事件,他们是我的应用程序之外。我该怎么做?

i try to develop an application who make a screenshot all mouseclick and when i hit the key "enter" for make a tutorial, but i don't see how capture this events where they are outside of my application. How i can do that ???

推荐答案

使用的项目处理全球鼠标和键盘钩子在C#。我用它之前,我个人一直推荐它

use this project "Processing Global Mouse and Keyboard Hooks in C#". I used it before and I personally always recommend it.

如何使用它:

添加TOT参考 Gma.UserActivityMonitor DLL来您的项目。

add reference tot the Gma.UserActivityMonitor dll to your project.

using Gma.UserActivityMonitor.GlobalEventProvider;

_globalEventProvider1 = new Gma.UserActivityMonitor.GlobalEventProvider();

this._globalEventProvider1.KeyDown += HookKeyDown;//to listen to key down
this._globalEventProvider1.KeyUp += HookKeyUp;//to listen to key down                
this.globalEventProvider1.MouseDown += HookMouseDown;//to listen to mouse down 
this.globalEventProvider1.MouseUp += HookMouseUp;//to listen to mouse up 

//and a lot more...

这篇关于如何使当你按下回车键,可以捕获所有点击一个应用程序,但在我的WinForm的呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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