Click to See Complete Forum and Search --> : System Idle Time


SricharanK
May 9th, 2001, 05:59 AM
Hi,
Can I know the sytem idle time i.e., a particular system is idle for how much time.
I want to perform some operation if the system is not used for about let us say 10 min. (Like how screen saver executes when you leave the system for the specified time)
Please help me.

Iouri
May 9th, 2001, 07:08 AM
Add timer to your form and at the end of each procedure start the timer which will calculate the idle time. At the beginning of each procedure reset the timer

Iouri Boutchkine
iouri@hotsheet.com

SricharanK
May 12th, 2001, 12:25 AM
Thank you for the reply.

I'm sorry, my question may not be clear.

I have 140 forms in my project. Enabling timer control at each and every proceedure in 140 forms is not a simple task.
Are there any API calls to find out the system idle time or Application Idle time, i.e user is not using my application for about let us say 15 min.

Thank you once again

Sricharan

coolbiz
May 12th, 2001, 08:44 AM
Another way of doing this is just to create another Form with the timer on it. You can load the form with the Visible property set to FALSE. Then create a public fuction in that FORM to ENABLE/DISABLE/RESET the timer.

Load the form on startup and each other procedures can just call the public functions to ENABLE/DISABLE/RESET the timer as needed. If the timer has been enabled and no one calls the RESET/DISABLE, then the form can do the neccessary action when time is up.

-Cool Bizs