I need to create an inactivity timer for a FF project with many forms.
Is there an easy place to detect keyboard activity and mouse movement in a single place that does not have to be in every form?
Thanks.
Unfortunately the only way i know how to do it would be to detect mouse / keyboard messages for each form.
erm they maybe something in the winapi about system in activity ?
sorry prob not much help./
I am not at my development computer at the moment so this is off the top of my head - totally untested. Maybe put the code in FF_PumpHook.
Function FF_PUMPHOOK(Msg As tagMsg) As Long
' Catch a mousemove or keyboard action.....
Select Case Msg.message
Case %WM_MOUSEMOVE, %WM_LBUTTONDOWN, %WM_LBUTTONUP, %WM_KEYUP, %WM_KEYDOWN, %WM_CHAR, etc......
' respond to the movement (screensaver?)
End Select
End Function
Pretty good without a computer --- Right on. EXACTLY RIGHT ON! 8)
I did not even think about the PumpHook function.
That will do the trick. I will set a (dreaded GLOBAL :o ) and on mouse or keyboard input reset it to zero. A timer will increment it so it can auto exit the program after a few hours after a certain time of the day. This will "kick out" the "turkeys" that stay in the application, go home, and keep the files from being backed up later.
THANKS!!