Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Exiting visual foxpro
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00478716
Message ID:
00490159
Views:
18
Realized that no where in my app is there a ON SHUTDOWN. I have a top level form and it gets instantiated in my main.prg. Of course in tht top levelform i close all the objects and do some clean up, and then in main.prg i have a procedure CLEANUP() that is called upon returning frmo the object. Can I have ON SHUTDOWN execute CLEANUP(), or no because it is in main.prg it is out of scope if ON SHUTDOWN gets called from the toplevelform?

When does ON SHUTDOWN get executed? Does it get executed under normal program termination?

Thanks

Brenda

>At a minimum, you need to issue a CLEAR EVENTS and tell VFP to quit when the >SHUTDOWN event occurs. Add the following line to your main program:
>
>ON SHUTDOWN DO AllDone
>
>Create a .PRG named AllDone.PRG; it should look so,mething like:
>
>* AllDone.PRG
>CLEAR EVENTS
>ON SHUTDOWN
>CLOSE ALL
>CLEAR ALL
>QUIT
Previous
Reply
Map
View

Click here to load this message in the networking platform