469,602 Members | 1,962 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,602 developers. It's quick & easy.

Updating Notify Icon Question

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.
Nov 16 '05 #1
3 6719
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.BaseDi rectory + "running.ICO");

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

Cheers
Paul

"jm" <jo*************@yahoo.com> wrote in message
news:c6**************************@posting.google.c om...
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.

Nov 16 '05 #2
jm
Thank you.
Where does this part of the code go at?

This is the code to clean up the notify icon:
if(notifyIcon != null)
notifyIcon.Dispose();
Thanks again.
"Paul Roberts" <Pa*********@nospam.nospam> wrote in message news:<eL**************@TK2MSFTNGP10.phx.gbl>... 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.BaseDi rectory + "running.ICO");

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

Cheers
Paul

"jm" <jo*************@yahoo.com> wrote in message
news:c6**************************@posting.google.c om...
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.

Nov 16 '05 #3
I had this in the form dispose.
"jm" <jo*************@yahoo.com> wrote in message
news:c6**************************@posting.google.c om...
Thank you.
Where does this part of the code go at?

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

Thanks again.
"Paul Roberts" <Pa*********@nospam.nospam> wrote in message

news:<eL**************@TK2MSFTNGP10.phx.gbl>...
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.BaseDi rectory + "running.ICO");
This is the code to clean up the notify icon:
if(notifyIcon != null)
notifyIcon.Dispose();

Cheers
Paul

"jm" <jo*************@yahoo.com> wrote in message
news:c6**************************@posting.google.c om...
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.

Nov 16 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by shagshag | last post: by
1 post views Thread by Joshua Russell | last post: by
4 posts views Thread by Beenish Sahar Khan | last post: by
1 post views Thread by Rob | last post: by
reply views Thread by Mike Eaton | last post: by
3 posts views Thread by Cylix | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.