2

I was wondering if it is possible to receive key input to a form that is out of focus. For example, I have my C# form to be top-most of all windows; I want to get all the keys I type on other applications like for example browser to kinda get a history of all the keys I typed while my computer was on.?

Is there a way to do this?

Y_Y
  • 1,259
  • 5
  • 26
  • 43

2 Answers2

2

You will need to create a global keyboard hook although be advised that this is not necessarily considered a good practice, and might cause issues with Anti-virus software.

Community
  • 1
  • 1
Luhmann
  • 3,860
  • 26
  • 33
0

Have a look here to see my answer in this keyboard hooking business here...in the link this OP was trying to find out how to hook the keyboard when running a VMWare session...In my answer I gave a couple of links pointing to the direction of CodeProject's articles on keyboard hooking.

Hope this helps, Best regards, Tom.

Community
  • 1
  • 1
t0mm13b
  • 34,087
  • 8
  • 78
  • 110