Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Force Log Out
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01025841
Message ID:
01027474
Views:
20
>I have done a similar lookup check, but there are one thing you must incorporate.
>That is there must be no "wait states" or places in the program that a user can have open that do not periodically check the lookup flag through the timer. This includes all Messagebox's.
>This means that each messagebox must use the timeout parameter, and each form must have a timer that checks the logout flag.
>
>Goodluck

I agree except that I did not add a timer to each form in the app. I created 2 timer classes - one to check the file, the other to log the user off the system. I just CreateObject'd them at the start of the application. They run as global timers, and so far, it's been working nicely.

In the app startup sequence:
* create timer to check table for logoff flag set (starts up enabled)
* timer will bring up logoff msg form if flag is true
otmrLogOffCheck = CreateObject('tmrUserLogOffCheck')
otmrLogOffCheck.interval = 1 * 60 * 1000  && check once a minute
otmrLogOffCheck.Reset()

* create timer to log user off (starts up disabled)
otmrLogOff = CreateObject('tmrLogOffUser')
otmrLogOff.interval = 2 * 60 * 1000  && 2 minutes - will be started up by logoff msg form
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform