 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Sonnich Guest
|
Posted: Fri Sep 02, 2005 1:14 pm Post subject: OnDestroy never called in TActiveForm |
|
|
Hi!
I have and active x from (TActiveForm), which includes different
things....
The point it, that there is an OnCreate event, which works...
however, the OnDestroy is never called....
have anyone worked with this?
I get some funny action, when the programme is being closed, as I
cannot close all my stuff (e.g. a thread).
Any ideas anyone?
S
|
|
| Back to top |
|
 |
Tony Mountifield Guest
|
Posted: Wed Sep 07, 2005 11:04 am Post subject: Re: OnDestroy never called in TActiveForm |
|
|
In article <1125666868.872116.88930 (AT) g49g2000cwa (DOT) googlegroups.com>,
Sonnich <sonnich.jensen (AT) elektrobit (DOT) com> wrote:
| Quote: | Hi!
I have and active x from (TActiveForm), which includes different
things....
The point it, that there is an OnCreate event, which works...
however, the OnDestroy is never called....
have anyone worked with this?
I get some funny action, when the programme is being closed, as I
cannot close all my stuff (e.g. a thread).
Any ideas anyone?
|
Yes, first look at the end of the interfaces section for the following
declaration in the class of your main form (by default TActiveFormX):
procedure Initialize; override;
and just after it, add:
procedure BeforeDestruction; override;
Then in the implementation section, add the follwing procedure:
procedure TActiveFormX.BeforeDestruction;
begin
OnDestroy := ActiveFormDestroy;
inherited;
end;
Where TActiveFormX is the class type of your main form.
See http://groups.google.co.uk/group/borland.public.delphi.com.activex.writing/browse_frm/thread/19e6d7310deadd18/83a386efcd8653e0 for my original posting on this topic.
Cheers
Tony
--
Tony Mountifield
Work: [email]tony (AT) softins (DOT) co.uk[/email] - http://www.softins.co.uk
Play: [email]tony (AT) mountifield (DOT) org[/email] - http://tony.mountifield.org
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|