views:

221

answers:

3

I am looking to create a VB.NET application. when the application is opened it will disable the keyboard and mouse so if you hit any keys it does nothing and you can not move the mouse. (even if currently selected window is not that of application).

MUST WORK ON WINDOWS 7!

Thanks in advance.

+1  A: 

Not going to happen, and not something you should really be trying to achieve in isolation.

You can (rightly) never intercept Ctrl+Alt+Del, for example

Rowland Shaw
+2  A: 

Both the mouse and the keyboard will be quite dead when you P/Invoke BlockInput(). The three finger salute will be required. Visit pinvoke.net for the declaration.

Hans Passant
A: 

Take a look at global hooks. They are bad. They are evil. But the exist because every once in a while someone actually needs them.

Chris Haas