Check if an Windows Application is Idle for a Period of Time(1 Hour) and Close Appl.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • UdayKumarB
    New Member
    • Nov 2008
    • 5

    Check if an Windows Application is Idle for a Period of Time(1 Hour) and Close Appl.

    Hi All,

    Did Anyone of you are aware of How to Find Windows Application(Win form) Idle time and If so, Close the Application.

    Thanks,
    Uday.
  • joedeene
    Contributor
    • Jul 2008
    • 579

    #2
    Maybe a Timer? And, use the form's MouseMove Event. Be sure to set the timer's interval rate at a real high number, like 10000 milliseconds.

    joedeene

    Comment

    • r035198x
      MVP
      • Sep 2006
      • 13225

      #3
      Using a timer is good, you'll need that. Using a particular event like mouse movement is not correct. There are so many other events that need to be catered for. Better use the Application.Idl e event. Be sure to read and understand its specs fully before writing any code though. It does have a few gotchas.

      Comment

      • UdayKumarB
        New Member
        • Nov 2008
        • 5

        #4
        Hi Thanks for early Replies,

        I want to implement this on Application Level. Like if I use Timer, I need to Start Timer in each and every form load. Is there any alternative for this. Like can we handle this on Operating System Level.


        Thanks,
        Uday

        Comment

        • Plater
          Recognized Expert Expert
          • Apr 2007
          • 7872

          #5
          There are more Timers then just the one you drag and drop onto your form.
          I recomend System.Threadin g.Timer

          Comment

          • joedeene
            Contributor
            • Jul 2008
            • 579

            #6
            Originally posted by Plater
            ...I recomend System.Threadin g.Timer
            Yup. That's where the Timer I linked in my first post is directed to.

            joedeene

            Comment

            Working...