hi
I am working on a windows form project. This application runs at the background and should stop all the keystrokes on any window running in the foreground.
Can anyone tell me how to stop the keystrokes reaching the foreground application (for ex: IE, Notepad, MS Word or any other)?
AlanPosted Oct 6, 2008, 1:58 PM
You'll need to install a global keyboard hook and then cancel the keystroke in the eventhandler.
See this Code Project article for how to install a global hook using C#:
http://www.codeproject.com/KB/cs/globalhook.aspx
However, you should be aware that global hooks slow down the system and may interfere with hooks installed by other applications.