Making tray icon visible after explorer.exe crash

F

FusionGuy

Hi,

I have an app that minimizes to the system tray (no problems there). The
issue is when/if explorer dies and my app continues to run, however the icon
no longer appears in the system tray. How do apps like MSN Messenger and
others manage to keep their tray icons visible after an explorer crash?
Thanks.
 
M

Mattias Sjögren

I have an app that minimizes to the system tray (no problems there). The
issue is when/if explorer dies and my app continues to run, however the icon
no longer appears in the system tray. How do apps like MSN Messenger and
others manage to keep their tray icons visible after an explorer crash?

Explorer broadcasts the message
RegisterWindowMessage("WM_TASKBARCREATED") after the taskbar has been
(re)created. At that time you should add any notification icons again.

The .NET NotifyIcon component handles this message internally so if
you use that, it should simply work without any extra work required.


Mattias
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top