You are right!

The app does have a useful mainform which is normally visible, but when 
the user "closes" the form using the [X] titlebar button for example, 
the program continues operating in the system tray.  For some reason I 
thought closing the mainform would also activate the OnClose event, but 
it doesn't.  So I can use the OnClose afterall.

Thanks,
Ross.

----- Original Message ----- 
From: "Robert Meek" <[EMAIL PROTECTED]>
To: "'Borland's Delphi Discussion List'" <[email protected]>
Sent: Saturday, May 14, 2005 4:13 AM
Subject: RE: finalization


Even with a trayicon there has to be a mainform for the application.
How are you using it, ( the trayicon )?  For application where I need a
trayicon but do not want it to effect or be effected by anything 
happening
to or with the user interface, I usually create a dummy form as my 
mainform
with no borders, icons, or anything but the trayicon, an imagelist, and 
the
context menu used by the trayicon.  I set ShowMainForm to false and 
never
show it.  But that still doesn't preclude making use of it's OnClose or
OnCreate events.


_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to