473,404 Members | 2,213 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 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 6902
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Lalit | last post by:
Hi Friends, I have developed a Windows service. Now i need icon for this service in systray and context menu fo this icon. Can i do this? With regards, Lalit
2
by: shagshag | last post by:
I know how to place a notify icon in the system tray and how to hide the Form that owe the icon. The taskbar entry button is hidden, ok, but I always get an entry for the Form when I press...
1
by: Joshua Russell | last post by:
Firstly my main method is like this: static void Main(string args) { // New Form Thread FormHandler myFormHandler = new FormHandler(); ThreadStart myThreadStart = new...
4
by: Beenish Sahar Khan | last post by:
I want to start my application so that its notify icon is added to the system tray, i don't want to show any starting form. I want user to interact through the notify icon...just like MSN. Is there...
1
by: Rob | last post by:
I have an interesting problem with my Notify Icon. I cannot get it to display when I start a web service. I have no problems when I test the software on a Windows program. But the Icon will not...
6
by: Neo | last post by:
i'd like to create an application which would run in the background, & there'd be an icon in the system tray (can use the notify icon). But HOW can i make the form invisible. What i'd like to do...
0
by: Mike Eaton | last post by:
Hi there, I have an app whose structure is as follows: a module calls a custom application context containing a notify icon and associated context menu, which in turn acts upon an instance of...
3
by: Cylix | last post by:
I am going to make an application in monitor and do something on time. A part of it is an Notify icon(System Tray Icon), Which project type can I be used for Just showing the notify icon without...
1
by: namrataa | last post by:
i have a notify icon for our media player developed in wpf. included files are notify.cs,notify.resx,notify.designer.cs. i have also added a class file called app.cs . now the problem is how...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.