473,327 Members | 2,069 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,327 software developers and data experts.

Refresh System tray

joe
Hi guys,

Is there any way to refresh the system tray. Every time
the explorer crashes the notify icons are removed and I
cannot see them when it comes back even when my
application is running.

I could not find any code to refresh the system tray in
the KB articles

any help or pointers would be appreciated

Regards,

Joe
Nov 15 '05 #1
3 9696
Joe,

If you are using the NotifyIcon class, then it should do it
automatically. Basically, what you have to do is call the
RegisterWindowMessage API function with "TaskbarCreated". When you get that
message in your message loop handler for the taskbar, you should add the
icons.

However, the NotifyIcon class should be doing all of this already. Is
it not doing this for you?

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"joe" <an*******@discussions.microsoft.com> wrote in message
news:0a****************************@phx.gbl...
Hi guys,

Is there any way to refresh the system tray. Every time
the explorer crashes the notify icons are removed and I
cannot see them when it comes back even when my
application is running.

I could not find any code to refresh the system tray in
the KB articles

any help or pointers would be appreciated

Regards,

Joe

Nov 15 '05 #2
Hi,

If the tray icons are not returning when the shell is restarted, it is
an indication that the software is possibly not ad-hearing dealing with
the shell restart.

When the shell is restarted it broadcasts a message that is registered
with the string "TaskbarCreated" using the RegisterWindowMessage API.
Applications that have put icons in the system tray should handle this
message to ensure that there icons are restored to the system tray.

So you could try broadcast this message, but I assume that the
applications are not handling this message anyway so it would be
pointless.

Note: If I recall correctly, the "TaskbarCreated" message has been
inplace from version 4.72 of the shell.

Hope this helps

Chris Taylor
http://www.xanga.com/home.aspx?user=taylorza

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 15 '05 #3

Nicholas,

Thanks for your reply,

Nope it doesn't seem to do that

Due to this problem I have to go to the task manager to
kill the exe as I cannot see the Icon

Is this a bug..?, also my SQL manager disappears when the
explorer crashes.

I am using Windows 2000 Professional and .NET framework
version 1.0.

Do i need to use API calls in my application to refresh
the system tray

Regards,

joe

Nov 15 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: elziko | last post by:
If I **HAD** to use Process.Kill to end an application that I had no other control over. This application leaves an icon in the system tray. Is there any way in code to force WIndows to refresh...
1
by: balu | last post by:
Hello , I Had a problem in developing a application for getting a message over or above system tray . When we first logon into the yahoo messenger , whenever a new user logon ,The messenger...
3
by: Nicolas Poirier | last post by:
I successfully made a system tray application. When I do shut down the computer, how does the computer can instruct my application to shut down? For the moment, if I don't quit my application,...
10
by: Crouchie1998 | last post by:
Hello To All You Real Programmers Out There!! There is an application called: "Tray It" Webpage: ---------- http://www.teamcti.com/trayit/trayit.htm Direct Download:
2
by: Oenone | last post by:
I've a little piece of code that I sometimes need to use that kills a running process when it stops responding. The process has a notification icon that it displays in the system-tray area of the...
5
by: bipi | last post by:
Dear everyone, In my application, I kill process by: private bool KillProcess(String processName) { bool result = false; Process process = Process.GetProcessesByName(processName); for (int...
3
by: Patrick Dugan | last post by:
I am using VS2005 (vb) and I have a program that starts when Windows boots up. Occasionally the icon that should appear in the system tray does not show up. The program is still running in memory...
1
by: =?Utf-8?B?RW5naW5lZXJpaw==?= | last post by:
I have an application which uses a notification icon in the system tray. When the application is closed the notification icon remains in the system tray until I hover over it with the mouse. How...
3
by: Usman Jamil | last post by:
Hi I've a windows application that does a lengthy backup process. While the process is going on, I need to show a progress bar inside system tray or just above the system tray. Can someone...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.