-=> Greg O'Brien wrote with startling eloquence to All <=-
GO> I am prompting the user to save a text file they have been editing in
GO> a Memo field when they exit the program.
GO> This works fine but if the user presses ALT-F4 or selects the Close
GO> option from the System Menu then my code (attached to the Menu item
GO> Quit1Click) is bypassed, and the program exits without prompting them
GO> to save.
Look at OnCloseQuery. This method will run anytime a close is requested. It
will allow you to query the user about saving changes and even abort the
close process through the use of a CanClose variable.
Example code in the help file should get you pointed the right way.
EEAS
eric@kobayashi.com
--- Blue Wave/DOS v2.21
---------------
* Origin: The Aircrash Bureau Chicago 312-278-1195 33.6 (1:115/327)
|