How to know the user’s inactivity?

jimpmathew

New Member
Licensed User
Longtime User
How to know the user’s inactivity from an application. Actually if user is inactive for a period I have to trigger some code. How can I do this. Please help.
 
Thank you for the quick reply. It was really helpful. But I have so many panels and buttons in my application. Do I need to write the reset code on all the button and panels click events? Is there any simple way to do this?
 
Upvote 0
touch event

it might be good enough to override this sub and update the last visit time

Code: Copy
Sub Activity_Touch (Action As Int, X As Float, Y As Float)
   lastTimeAlive = DateTime.Now
End Sub

of course you need to set the timer, and remember to shut it down on activity pause sub, and turn it on on resume sub, etc
 
Upvote 0
Back
Top