Auto-shutdown

I manage a program that I often enhance or revise. When it comes time to recompile I have to track down the users and ask them to close the program. There is one in particular who starts the program first thing in the AM and leaves it up all day. I want to put in a feature that will detect XX minutes of inactivity and close the program. I tried 'IF Inkey(300) = 0' but that just stops and waits 5 minutes. I think the key is the timer control but I can't figure out when to activate it.

All I want is: after 5 minutes of inactivity close the program.



Answer this question

Auto-shutdown

  • mRW1Zard

    I've used timer objects for auto shutdown with varying success.
    Drop one on your form/class

    Reset it (.interval to shutdown) with myform.mouseover event-Trigger
    Repeat with some of the bigger myForm.myObjects.

    I've had to place the .mouseover trigger on about 10 of myBigger objects

    (hope this helps)

    Philip


  • A. Iduoze

    James,

    You can use a timer object that keeps having its value reset to the max on every keystroke, that can be a little hard to manage.

    Another option is to use a loader program that the users start first, it checks the network for a new exe and downloads it to their computer and then starts the local exe. This way you are free to update the network copy.



  • Auto-shutdown