开发者

How to make an application that can capture all click when you press the Enter key, but in my WinForm as well?

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


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

How to use it:

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...


You need to have a look in to implementing windows hooks.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜