472,146 Members | 1,382 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,146 software developers and data experts.

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 6814
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 leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.