Reputation: 211
I have in C# this function , for key press. When you press a key will be executed function a()
protected virtual void OnKeyPress(object sender, KeyPressEventArgs e) { a(); }
I need a method which to execute a function globally, in outside of my application , in outside of .NET Framework , anywhere in Windows.
Advanced thanks you!
PS: I don`t want to develop a malicious application, a constructive (antikeylogger method) ;)
Upvotes: 0
Views: 390
Reputation: 4550
This article at CodeProject describes how you can install a Global Keyboard hook using .Net/C# to get that event you need.
http://www.codeproject.com/KB/cs/globalhook.aspx
Upvotes: 2