I had code similar to the following in my old FoxPro DOS apps:
AllDone = .F.
AppDelay = 60
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