Delphi Close Button

[ Delphi Forum ]

Posted by Joey on January 21, 2004 at 18:15:51:

In my Delphi application i have a close button. The close button checks a listbox to see if its empty if it is it closes the app if not it prompts you and asks if you want to save. There are 3 button: Yes, No, Cancel
if Yes is pressed the save dialog comes up and on saving the app closes
if No is pressed the App closes
if canceled press the dialog goes and your back to the form.

How can make it so this will happen when the X button in the corner is pressed... i did it but when you pressed cancel the app also closed! is there a way to make it so it would run the exact same procedure as the close button?

Related Articles and Replies:

[ Delphi Forum ]