Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Logging out a user after idle time has elapsed
Message
From
16/06/1999 11:19:43
 
 
To
16/06/1999 11:00:28
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00229547
Message ID:
00230437
Views:
23
>>>HI everyone!
>>>I would like to include a automatic logout procedure in my application which will execute if the application has been sitting idle for sometime. What would be the best way to program this scenario?\
>>
>>A timer sitting in each form, with the Interactive Change event set to restart the timer for any keystroke or mouse click. If the timer evenr ever fires, nothing has happened in time, and you close down the form...
>>
>>>I will appreciate your help.
>
>
>What if the user has more than one form open at the same time? Couldn't the form that hasn't been used 'in time' fire off the logout procedure when, in fact, the user was just using the other form? Is that how it would work?
>

You could use your form manager class to help here - shut down the form and send a message to the form manager that a timeout occurred. If as a result of timeout, no forms were up and running, then all forms are now closed, the last by timeout, so you can shut down...

You can change the general timeout behavior so that forms don't shutdown from timeouts until all forms have registered a timeout event. That's really the responsibility of the form manager, and not the individual form; the form kows that it hasn't been active, but the form manager has responsibility for all active forms, at least in theory.

This assumes that you've got a form manager object to work with; if you don't have one, it's something you really need to add to your framework in any case with the possibility of multiple modeless forms operating at the same time.

>- A Hilton
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform