How I can stop my application if not use it for a period of time ?
1 Replies - 236 Views - Last Post: 28 March 2012 - 08:07 AM
#1
How I can stop my application if not use it for a period of time ?
Posted 28 March 2012 - 07:48 AM
Replies To: How I can stop my application if not use it for a period of time ?
#2
Re: How I can stop my application if not use it for a period of time ?
Posted 28 March 2012 - 08:07 AM
First you need to define "inactive" .. does that include mouse movements over x, y, or z? Window focus? Button clicks? Database transactions?
From there it would be an easy transition to have a bunch of booleans that flip off when action X happens and flip on when action X ends.. then a timer to see if it's been so many minutes while those have been false and if so close the app!
The critical part is to outline what is or is not an action and when said action starts and stops. The rest is pretty trivial.
From there it would be an easy transition to have a bunch of booleans that flip off when action X happens and flip on when action X ends.. then a timer to see if it's been so many minutes while those have been false and if so close the app!
The critical part is to outline what is or is not an action and when said action starts and stops. The rest is pretty trivial.
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote







|