L le_toubib Active Member Licensed User Longtime User Jul 21, 2016 #1 Hi all I'm trying to exit application when the user is not using it for a set time. I tried to reset a timer on mouse move .. but the app crash ... Is there a better way?
Hi all I'm trying to exit application when the user is not using it for a set time. I tried to reset a timer on mouse move .. but the app crash ... Is there a better way?
Erel B4X founder Staff member Licensed User Longtime User Jul 22, 2016 #2 le_toubib said: I tried to reset a timer on mouse move .. but the app crash ... Click to expand... You need to provide more information. What did your code do? Why it crashed? Create a timer that ticks every 10 seconds. Store the current time in a global variable in the MouseMove event. Check whether x seconds have passed in the timer tick event. Upvote 0
le_toubib said: I tried to reset a timer on mouse move .. but the app crash ... Click to expand... You need to provide more information. What did your code do? Why it crashed? Create a timer that ticks every 10 seconds. Store the current time in a global variable in the MouseMove event. Check whether x seconds have passed in the timer tick event.
jmon Well-Known Member Licensed User Longtime User Jul 25, 2016 #3 On windows, you can use this class https://www.b4x.com/android/forum/threads/jwin32idletime-get-users-idle-time-windows.40210/ to get the idle time. The idle time stops counting when the user presses the keyboard or moves his mouse Upvote 0
On windows, you can use this class https://www.b4x.com/android/forum/threads/jwin32idletime-get-users-idle-time-windows.40210/ to get the idle time. The idle time stops counting when the user presses the keyboard or moves his mouse