-
hi,
I am facing problem can anybody help me please.
The problem is given below.
What actually i want to do is that in the form i want to set timer using API in form load event for some 3 minute and if user does not press any key or does not
move mouse then the set timer API will call procedure which will do certain activity.
But i don't know how to Recognition keypress or mouse move thru API(Window API)And when it Recognition the mouse move or keypress then i want to call a procedure which will get executed when it finds that
either a key is pressed or mouse move.But all this i
want to do using API.
THX
-
Here is how to detect keypresses and mouse clicks:
Code:
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Private Sub Timer1_Timer()
Dim iKey As Integer
For iKey = 0 To 255
If GetAsyncKeyState(iKey) Then Debug.Print iKey
End Sub