strange, your post header read finalization, so why dont you put it in the finalization section of the units .
On 5/13/05, Ross Levis <[EMAIL PROTECTED]> wrote: > I'm trying to establish the best event to destroy objects etc when my program > is closing down. The OnFormClose (of the mainform) is where I normally do > this in other programs but an app I'm working on right now minimizes to the > system tray so there is no mainform to close when the program is terminated. > > I need access to some other forms before they are destroyed, so I can't use > the OnDestroy event of the mainform, as I believe this occurs last after all > other forms are destroyed. > > The code needs to run if Windows is shutdown as well. > > Does anyone have any suggestions? > > Regards, > Ross. > _______________________________________________ > Delphi mailing list -> [email protected] > http://www.elists.org/mailman/listinfo/delphi > _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi

