how could i disable and renable a mouse and keyboard with a time limit...?? lets say i want to disable my keyboard when im away for about 3 minutes or so.. after 3 minutes it will be enabled again.. could anyone help me on this..??
____________________________
-same thing over and over again..-
31-07-2006 at 05:20 AM
|
misterxed Level: VB Lord Registered: 12-06-2005 Posts: 151
Re: how to disable and renable..??
Hi,
Here u go :
Private Declare Function BlockInput Lib "user32" (ByVal fBlock As Long) As Long
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Sub Command1_Click()
DoEvents
'block mouse n keyboard input
BlockInput True
'wait 10 seconds before unblocking it
Sleep 10000
'unblock mouse n keyboard input
BlockInput False
End Sub