Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can VFP know if it's idle for a period of time?
Message
 
To
08/08/2001 09:51:53
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00541244
Message ID:
00541262
Views:
56
>I have several forms in an app. If there is no user interaction for 30 minutes I'd like to shut VFP6 down. Is there a way to do this without hardcoding a timer in each form that gets reset by control's interactive change, etc.?
>
>Thanks,

Allen,

No, and you'd have to include something to monitor whether or not there were menu selections being indicated that didn't necessarily require user interaction.

AFAIK, the easiest way still requires a timer. I'd create one at the application level and periodically check to see if a screen saver was running via the SystemParmatersInfo() API call. This, however, is problematic a best. The user may have a very short period of time set to activate the screen saver. Mine re-starts every three minutes for example. The same function could be used to get the duration and do a calculation based on the amount of time that the screen saver has been running. Still, a lengthy operation may be in progress and you wouldn't want to interrupt that. Further, the user could password protect the screen saver and that would relieve the need possibly to shut down that application.
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform