Click to See Complete Forum and Search --> : Icon in system tray problem
bucko
Jan 24th, 2000, 08:37 PM
Hi, I have a program, that when minimised runs in the system tray. Everything appears to work ok, until I quit the program. The icon for the program still sits in the system tray until i move the mouse over it, then it goes.
how can i get the icon to disappear as soon as the program is terminated.
thanks in advance
MICK
Candu
Jan 24th, 2000, 09:03 PM
I have the same problem and I implemented the following solution. I have a dummy form that holds the icon that is displayed in the tray and when I unload the form from memory and then execute a DoEvents followed by the End statement explicitly my icon goes away properly. However if I do not use the End statement to terminate the program I have the same problem as you are now experincing.
------------------
David L. Baudais
Systems Analyst
Eclipse DevSoft
Jan 25th, 2000, 11:14 AM
If you wrote your own code to display the icon in the systray, then you must explicitly destroy the icon you created by using the parameter 'NIM_DELETE' (&H2) for the Shell_NotifyIcon API. If you're using a control or some dll, then I must say, the author of the program should know better, you can't do much about it since the icon is controled by that app and not you. If you need a Tray control, I have one in my page
www.geocities.com/eclipseds (http://www.geocities.com/eclipseds)
------------------
Share your knowledge, it is the best way to achieve immortality
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.