472,129 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,129 software developers and data experts.

Disable User Input

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
Nov 16 '05 #1
4 3468
Well - you should be able to do a system-level hook - but doing this from
..NET may involve some nasty P-Invoking

--
Sriram Krishnan

http://www.dotnetjunkies.com/weblog/sriram
"Alexander Muylaert" <Re********@pandora.be> wrote in message
news:OL**************@TK2MSFTNGP14.phx.gbl...
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

Nov 16 '05 #2
Sriram Krishnan wrote:
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.
Nov 16 '05 #3
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
Nov 16 '05 #4
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

--
Sriram Krishnan

http://www.dotnetjunkies.com/weblog/sriram
"David McClarnon" <dm********@ntlworld.com> wrote in message
news:Vh***************@newsfe1-gui.ntli.net...
Sriram Krishnan wrote:
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.

Nov 16 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by jwsacksteder | last post: by
1 post views Thread by Lisa | last post: by
reply views Thread by dotnetkumar | last post: by
2 posts views Thread by khng | last post: by
9 posts views Thread by surf_doggie | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.