Hi,

thanks to all those who replied so far. I should have
mentioned that I'm working on windows. The program
I'm writing is supposes to prevent the user from using 
the system until they have pressed a button. Once this
button is pressed the "client" sends a message to a 
"server". The "server" then replies and tells the client
to unlock. The user can then use the windows machine,
browse the net, etc.

I should mention that I was using wxPython originally to 
draw my lock/unlock button. I had to move to pythonwin/win32gui 
because I just couldn't see a way preventing the user
from opening any other apps/using the system until this
button was pressed. I'm a complete beginner when it comes
to mfc so I'm not having much success with this at the 
moment.

I've had a number of useful suggestions so far:

One suggestion was to use a system modal but I don't think
that can completely "lock" the system, I'm looking into it 
at the moment, so correct me if I'm wrong.

Another suggestion was to use the screen saver/ pretend to
be a screen save, however I'm not sure how that would work
as I still need to display active desktop in the background.

Another solution I came across was a VB-script which called
the windows function BlockInput(). This apparently completely
disables the keyboard/mouse. This isn't ideal and indeed I want
to stay well away from VB, but if someone new of something
like this it might do as a temporary solution.

I'm currently banging my head of the table trying to get some 
solution to this. Thanks again for all the replies/suggestions
and keep them coming, 

om




>
>Hi,
>
>Does anyone know how I could get one window
>with a button on it, to handle all mouse and 
>keyboard events. Thus preventing a user from 
>doing anything else but clicking on the button?
>Any suggestions/comments on how I could go
>about doing this would be greatly welcomed, 
>thanks,
>
>om
>
_______________________________________________
ActivePython mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activepython

Reply via email to