app timeout - borrow from windows screensavers?

jmerritt
jmerritt used Ask the Experts™
on
Hi,
I'm trying to write a routine that will cause my app to timeout and unload itself after a period of inactivity.  I started writing a class with a timer, etc. etc.  I can probably get there eventually using this approach.  I reset the counter based on Activate events, etc.

However, is there a way for a developer to grab the inactivity checking Windows does for screensavers?  Theoretically, if the user is typing or moving the mouse, I'd like my timeout counter to be reset to 0.  Once the user is idle, however, I want my app to start the countdown (or countup depending on your point of view).  

Aren't there API calls or something that expose this to developers?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
maybe this example from ark can help

http://www.freevbcode.com/ShowCode.Asp?ID=3297
Author of the Year 2009

Commented:
Hi jmerritt,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept vinnyd79's comment(s) as an answer.

jmerritt, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept THIS comment as an answer.
==========
DanRollins -- EE database cleanup volunteer

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial