cancel
Showing results for 
Search instead for 
Did you mean: 

Delphi 2005 vcl.net, addon close

Former Member
0 Kudos

Hi Everybody,

I have tried to write an addon (delphi 2005: vcl.net) to capture the events, seems perfect. But fail to close/end the addon by capture the aet_ShutDown event. As the following code, when shutdown SBO, it can show "Close1" and "Close2", but can close the application. Although deleted showmessage of "Close2", still can't close.

procedure TForm1.SBOappAppEvent(EventType: BoAppEventTypes);

begin

if (EventType = BoAppEventTypes.aet_ShutDown) or (EventType = BoAppEventTypes.aet_ServerTerminition) then

begin

SBOapp.MessageBox('Close1', 1, '1', '2', '3');

Close;

SBOapp.MessageBox('Close2', 1, '1', '2', '3');

end;

end;

Welcome for any sample or hint. Thx.

Regards,

B

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Finally I use a stupid but work method...

1) Add a timer component

2) Disable it

3) Catch SBO exit event to enable the timer component

4) the timer component to perform the addon end procedure

Former Member
0 Kudos

Hi,

PostQuitMessage(0);

Peter

Former Member
0 Kudos

Thx.

Seems Still Fail.

barend_morkel2
Active Contributor
0 Kudos

I'm not sure if I'm understanding the question, but try this:

Application.Terminate;

(You'll have to include the Forms class in your 'uses clause')

Former Member
0 Kudos

tried .terminate before but still fail to close.