Click here to Skip to main content
15,890,557 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I created an application with a system tray icon using using MFC. When I kill that process the process is no longer visible in the task manager, but the tray icon is still showing in the system tray. Once one does a mouse-over on the tray icon it disappears.

Why is this happening and how can it be avoided?

Once I kill the process the tray icon should vanish from the system tray.

Thanks for any hints!
Posted
Updated 1-Oct-12 4:04am
v2
Comments
Joan M 1-Oct-12 10:01am    
Without seeing the code...

Leaving that apart this is the normal way to handle it, there are plenty of apps out there that have this "bug" which makes you to hover with the mouse the icon before seeing it fade away if you kill the app...
Mohibur Rashid 1-Oct-12 10:07am    
if you kill it will be there, but if you write a pare of line to remove it from task bar before leaning then it will solve your problem. but still if you kill the app then it will be there
@BangIndia 3-Oct-12 2:27am    
Yes..Thanks for the comments.
Any Example...?
Achha Insan 3-Oct-12 5:27am    
nothing is impossible. you can do it.

1 solution

it is by design. Once you've placed the icon in the System Tray it is owned by the system. It is up to the system to monitor if it's there. If you really want to remove the icon when your program is killed, you need to write a separate watch dog application that will do just that
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900