on 08-02-2005 2:55 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
PostQuitMessage(0);
Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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')
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.