Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Converting to READ EVENTS from READ
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Converting to READ EVENTS from READ
Miscellaneous
Thread ID:
00796195
Message ID:
00796195
Views:
36
I had code similar to the following in my old FoxPro DOS apps:
AllDone = .F.
AppDelay = 60

***  read user input until QUIT is selected
IF ! AllDone
    READ TIMEOUT (AppDelay) VALID (DoneYet())
ENDIF
The Quit command on the MainMenu would set AllDone to .T. and DoneYet would open a system database and check and return a logical field value. If I wanted to shut down the app for maintenance I could change the logical field value to .F.

In my VFP apps I now use READ EVENTS. The Quit command simply does a CLEAR EVENTS. Does anybody know of a simple way to implement the DoneYet functionality? I want to be able to shut down the app if the user is at the MainMenu.

I could modify each menu item's procedure code to start and stop a timer that would only run when the user is at the MainMenu. But that seems like a lot of work.
Dennis Lindeman
Next
Reply
Map
View

Click here to load this message in the networking platform