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
From
08/08/2001 10:18:52
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
08/08/2001 09:51:53
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00541244
Message ID:
00541272
Views:
38
>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

I think you would need to something like this:

  • Still use a timer.
  • Set ThisForm.KeyPreview = .T. for each form (do this in your base class).
  • In the Form.KeyPress event, issue Timer.Reset(). This will start counting from zero. (Do this in your base classes, too.)
    Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
  • Previous
    Next
    Reply
    Map
    View

    Click here to load this message in the networking platform