On 16-May-07, at 9:06 AM, Arnaud Nicolet wrote: > Le 16 mai 07 à 16:42 Soir, Norman Palardy a écrit: > >> On 16-May-07, at 7:49 AM, Jim Dossey wrote: >> >>> Does anybody know how, in Windows, to tell if the user is inactive >>> for some >>> period of time? I need to do something like most IM clients do >>> where if the >>> user is inactive for a set number of minutes it triggers some >>> event. I >>> searched the archives but couldn't find anything about an inactive >>> user. >> >> a timer would do it >> simply reset it when they do something and then when the timer >> eventually fires do what ever it is you need to do when they are idle > > How do you handle cases where the mouse is moved outside of the > window? Since you don't receive a MouseMoved event, you also have to > add a second timer (with a short period) to compare the coordinates, > as Mark mentioned. Same applies for dead keys (shift, alt, etc).
Depends on what you want to count as "active". Many count activity (typing a message) only. You could use the various mouse enter end exit routines and even one to track the keyboard _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
