Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread TForm.Close not triggering OnClose
Tue, Dec 29 2015 3:43 PMPermanent Link

Ronald

Hi,

I have a form in EWB 2 which should show a message in the OnClose event, but it does not. The event does not seem to be triggered. Am I overlooking something?

Greetings,
Ronald
Tue, Dec 29 2015 4:18 PMPermanent Link

Raul

Team Elevate Team Elevate

On 12/29/2015 3:43 PM, Ronald wrote:
> I have a form in EWB 2 which should show a message in the OnClose event, but it does not. The event does not seem to be triggered. Am I overlooking something?

OnClose fires OK here - using 2.04.


Would need some more info to help further - is this a popup form or main
form ; are you overriding the event handler in code somewhere by any
chance etc?

Raul





Wed, Dec 30 2015 8:19 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Ronald,

<< I have a form in EWB 2 which should show a message in the OnClose event, but it does not. The event does not seem to be triggered. Am I overlooking something? >>

Do you have an OnCloseQuery event handler defined that is preventing the close by returning False ?

Tim Young
Elevate Software
www.elevatesoft.com
Thu, Dec 31 2015 5:11 AMPermanent Link

Ronald

Tim Young [Elevate Software] wrote:

<<Do you have an OnCloseQuery event handler defined that is preventing the close by returning False ?>>

Oops, did overlook something...

I call the form as follows:

aForm:=TaForm.Create(nil);
aForm.OnClose:=aFormOnClose;

This overwrites the OnClose of course. Had to think of that of course, but I was focused too much on the code in the form.
Image