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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Block Keyboard and mouse input

Status
Not open for further replies.

darrellblackhawk

Programmer
Aug 30, 2002
846
US
The following blocks keyboard and mouse input.

It won't stop a cntrl+alt+delete.

Make sure you unblock after it's no longer needed.
If not, no other app will be able to run until a reboot.

Darrell

[tt]
Declare integer Sleep in Win32Api integer
Declare integer BlockInput in Win32Api integer

BlockInput(1)
Wait "Keyboard input blocked" window nowait
Sleep(5000)
BlockInput(0)
Wait "Keyboard input unblocked" window nowait
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top