Updating Notify Icon Question

J

jm

Hi,

I have a C# program that changes the notifyIcon during the program.
What I have noticed is that sometimes when the program is over the old
icon will still be in the system tray. But when i move over the icons
in the taskbar the taskbar will immediately update itself and clear
the old icon away.

I was just wondering if this is normal or if I am supposed to "force"
an update of the taskbar system tray icons somehow?

Thank you.
 
P

Paul Roberts

If your application quits without cleaning up the notify icon it will stay
in the task bar. If you then mouse over the item it will the just
disappear.

This is the code I have that changes the icon:
notifyIcon.Icon = new
System.Drawing.Icon(AppDomain.CurrentDomain.BaseDirectory + "running.ICO");

This is the code to clean up the notify icon:
if(notifyIcon != null)
notifyIcon.Dispose();

Cheers
Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top