TIP: Click on subject to list as thread! ANSI
echo: delphi
to: GREG O`BRIEN
from: ERIC SCHREIBER
date: 1996-10-07 10:32:00
subject: Help with trapping ALT-F4

-=> 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)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.