Refresh System tray

  • Thread starter Thread starter joe
  • Start date Start date
J

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
 
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.
 
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
 
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
 
Back
Top