Systray needs update when explorer.exe crashes.

Posted on 2006-05-05
Last Modified: 2010-05-01
When explorer.exe crashes and restarts, some applications (ie: mIRC) replace their icon in the SysTray.  How do I go about getting my application to do the same?

Question by:Javin007
    LVL 85

    Accepted Solution

    Use the RegisterWindowMessage() API to look for the TaskBarCreated message.

    Take a look here:

    An example of using TASKBARCREATED with RegisterWindowMessage() here:

    So whenever you get the TaskBarCreated messaged, add your tray icon again using the Shell_NotifyIcon() API with the NIM_ADD message.
    LVL 4

    Author Comment

    So is this a constant check I'll have to do, or will it fire an event somewhere?

    LVL 4

    Author Comment

    Ah, just read the part about subclassing.

    Thanks for the answer!


    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    Suggested Solutions

    Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
    If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now