Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Howto catch the screen close event? 1

Status
Not open for further replies.

RedLion

Programmer
Sep 13, 2000
342
NL
Hello

My question is how to catch the form close event from the main screen. Because when you click on it now it says 'Cannot Quit Visual FoxPro'.

When there is clicked on the screen form close, it should test an expression and when that evaluates to true it should execute the statement 'clear events'.

How to do this?

Thanks,

Charl
 
You can intercept an attempt to close the main VFP window with the ON SHUTDOWN command. For example:
Code:
ON SHUTDOWN DO MyShutdownPrg
Your MyShutdownPrg needs to contain all of your confirmation boxes and cleanup code, then CLEAR EVENTS to finish up.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top