-3

Possible Duplicate:
How can I block keyboard and mouse input in C#?

Under How can I block keyboard and mouse input in C#? there is a way how to block mouse and keyboard input in C#. Is there a way to lock only keyboard and allow mouse input?

Community
  • 1
  • 1
creativeDev
  • 1,113
  • 2
  • 13
  • 20
  • 3
    We cant simply just write code for you ! – Rosmarine Popcorn Jan 06 '12 at 13:41
  • Research WIN32 mouse and keyboard message hooks. – user1231231412 Jan 06 '12 at 13:46
  • Please explain the problem. You linking to a question thats "how do I do this" and then asking "how do I do this" does explain what you are trying to do. Any code you write would only be able to block the keyboard and mouse input while it was running. So please explain IN DETAIL what you are trying to do. I should add that the question you reference tells you exactly how to do it. – Security Hound Jan 06 '12 at 14:13

1 Answers1

0

The answer is already in the question you link to.

This article: http://www.codeproject.com/KB/cs/globalhook.aspx

shows the direction you need to head towards. Its called a low level hook. I'm not sure how his implementation exactly works but at the low level you have the option of passing on the message to other processes. You can choose not and this will prevent input travelling anywhere.

I suggest downloading his code, examining his P/Invoke code and seeing if he passes up the option to pass on the input, if not, rewrite it so it does!

Note: I believe CTRL+ALT+DELETE is still not "killable" using this method.

Quibblesome
  • 25,225
  • 10
  • 61
  • 100