Disable User Input

  • Thread starter Thread starter Alexander Muylaert
  • Start date Start date
A

Alexander Muylaert

Hi

How can I disable all user input? I would like to fully ignore all keyboard
and mousevents.

Is their a disabletaskwindows available or something likewise?

kind regards

Alexander
 
Well - you should be able to do a system-level hook - but doing this from
..NET may involve some nasty P-Invoking
 
Sriram said:
Well - you should be able to do a system-level hook - but doing this from
.NET may involve some nasty P-Invoking

Why would you want to do this ? Why do you want to lock up windows
completely apart from your application ?

Would you like to buy an application which locks up your windows desktop
whilst it did something ? Probably not.

Please explain further.

Darwen.
 
No man

I don't to disable Windows, I wan't to disable user input in my app for a
while.

I would lke to write a loop like

while MsgWaitForMultipleObjects(yaya, QS_ALLINPUT) {
while peek {
if (Msg != Keyboard) and (Msg != Mouse) then Dispatch.
}
}

I know the WaitHandle.WaitAny allows a message to fall through, but I'm not
sure if it blocks input messages.

I would like to be able to handle all timer, messages while waiting for an
event.

kind regards
 
No - not lock up Windows completely. With system level hooking you can
choose which messages get through and which dont - so the original poster
can disable user input like he wants to
 
Back
Top