2

Possible Duplicate:
Can you send a signal to Windows Explorer to make it refresh the systray icons?

During un-installation, when the app crashes, if it had a system tray icon, the icon remains on the system tray and is not removed along with the crashed process. Is there a way to refresh system tray from a C++ code to remove this artifact?

PS. I'm not the one who wrote the app that crashes, so I cannot fix that.

Community
  • 1
  • 1
c00000fd
  • 20,994
  • 29
  • 177
  • 400
  • 2
    Does the icon not go away when you hover the mouse over it? – TheZ Nov 07 '12 at 23:40
  • You reminded me of [this](http://blogs.msdn.com/b/oldnewthing/archive/2012/08/14/10339263.aspx). – chris Nov 07 '12 at 23:44
  • What I'm referring to is the area next to the clock on the taskbar. I'm also talking about doing it programmatically. – c00000fd Nov 07 '12 at 23:50
  • @user843732 I ask because if mouse over doesn't make the icon go away then it wasn't a clean crash (oxymoron?) and there is a process keeping the icon alive. – TheZ Nov 07 '12 at 23:54
  • The taskbar notification area has very little controlling API as most of the other areas do. I don't think it's possible to refresh the area, at least not with documented methods. – chris Nov 07 '12 at 23:55
  • @TheZ: Yes, it does go away if I mouse over it... – c00000fd Nov 08 '12 at 01:08
  • 1
    take a look at the similar [question](http://stackoverflow.com/questions/74723/can-you-send-a-signal-to-windows-explorer-to-make-it-refresh-the-systray-icons) – westwood Nov 08 '12 at 07:12
  • @Apokal: Very nice find. Thank you! – c00000fd Nov 08 '12 at 09:09

0 Answers0