1 Replies - 296 Views - Last Post: 28 March 2012 - 08:07 AM Rate Topic: -----

#1 usamah_g  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 21-March 12

How I can stop my application if not use it for a period of time ?

Posted 28 March 2012 - 07:48 AM

How I can stop my application if not use it for a period of time ?
Is This A Good Question/Topic? 0
  • +

Replies To: How I can stop my application if not use it for a period of time ?

#2 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 8374
  • View blog
  • Posts: 31,122
  • Joined: 12-June 08

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.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1