DISABLE/ENABLE mouse and keyboard HELP :(
Private Declare Function BlockInput Lib "user32" (ByVal fBlock As Long) As Long
Private Sub Command1_Click()
Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
BlockInput True
ProgressBar1 = Val(ProgressBar1) + Val(10)
If ProgressBar1.Value = 100 Then
Timer1.Enabled = False
BlockInput False
MsgBox ("You can now use your mouse and keyboard"), vbInformation
ProgressBar1.Value = 0
End If
End Sub
this code which i have search through the internet.
but our project is more likely this but it has some features like
by using three(3) USB(flashdrive) and a switch
usb1 - disable mouse and keyboard
usb2 - enable mouse and keyboard
usb3 - normal storage device
WE ARE DONE WITH OUR SWITCH :))
but our problem now is the program
example is I dont want anyone look at my computer whenever i am away
so i will use this USB1 to disable those ports
and when i would like to use it again i will use USB2
can you help us with this project?
Re: DISABLE/ENABLE mouse and keyboard HELP :(
up for my this
nid help :(
Re: DISABLE/ENABLE mouse and keyboard HELP :(
Quote:
Originally Posted by
alrightyoo
up for my this
nid help :(
Please don't bump your threads.
Why do you want to turn off the mouse and keyboard?
Re: DISABLE/ENABLE mouse and keyboard HELP :(
Quote:
Originally Posted by
alrightyoo
example is I dont want anyone look at my computer whenever i am away
so i will use this USB1 to disable those ports
and when i would like to use it again i will use USB2?
I don't understand your example. First off it's silly to use BlockInput to prevent people from using your computer while you're away instead of just locking the computer using the usual Windows mechanism and password protecting your account. I also don't understand how you're suggesting you use USB. You... want to stick a particular USB drive in the computer and have it disable/enable input depending on the contents of the drive? What? The only uses I can think of for such a scheme are malicious.