M
Matt Gilarde
Guest
I've written a class which implements this functionality using a timer and the GetLastInputInfo API. The attached zip file contains the class (IdleTimer.cls) and a demo program (runme.p and Form1.cls). When you run the demo it displays the current value of ETIME and starts a 10-second timer. The ETIME value will be updated when you haven't moved the mouse or typed anything for 10 seconds. The displayed value shows how long (in milliseconds) it has been since the timer was started (so it will be the total of how long you interacted with the system plus 10 seconds). You can type in the edit box where ETIME is displayed if you want to interact with the program. I put this together quickly so it hasn't been thoroughly tested. The usual fine print and disclaimers apply.
Continue reading...
Continue reading...