Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to disable any input from keyboard or mouse

Status
Not open for further replies.

CGR707

Programmer
Jul 7, 2002
20
0
0
PH
Hi,

Can anybody help me on how to disable the keyboard (including the winkey) and mouse in visual foxpro program.

Here's my sitiution. I owned a small Internet Cafe business, and i somehow develop a program that can control the workstation (reboot/shutdown the PC). What i want to happen is that, when workstation (or PC#2) is already timed, a window will popup, informing the user that he/she times is up and the keyboar and mouse will going to DISABLE.

I want to know, what is the command that can disable the keyboard and mouse function. Is it Possible? Hope it is.

Please help me on this one. Thanks a lot.




 
From link:
FoxPro declaration:

DECLARE INTEGER BlockInput IN user32 INTEGER fBlockIt

Parameters:
fBlockIt
Specifies the function's purpose. If this parameter is TRUE, keyboard and mouse input events are blocked. If this parameter is FALSE, keyboard and mouse events are unblocked.

Return value:
If the function succeeds, the return value is nonzero.
 
To complete rob444 suggestion, the call to the function is:

Code:
BlockInput(1)  && This is blocked
BlockInput(0)  && This is unblocked

Please note that API declarations are case sensitive.



Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Thanks a lot rob444 and mgagnon. It works. but, i still have a little problem, the <ctrl+alt+del> is still functioning. Is there any way that i can disable that function also?. Thanks for your help.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top