469,348 Members | 1,322 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,348 developers. It's quick & easy.

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 3388
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
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.