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?