TrayIconBuster

A utility that removes phantom icons from the Icon Tray
Download

TrayIconBuster Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Freeware
  • Publisher Name:
  • Luc Pattyn
  • Publisher web site:
  • http://www.perceler.com/index.php
  • Operating Systems:
  • Windows All
  • File Size:
  • 8 KB

TrayIconBuster Tags


TrayIconBuster Description

The TrayIconBuster application was developed to be a small utility that will allow you to remove phantom icons from the Icon Tray .A lot of programs install a NotifyIcon in the Icon Tray. Your system probably shows icons for Volume Control, Task Manager, Network Connections and many more. When a process installs a NotifyIcon and then exits without disposing of it, the icon remains present until you move the mouse pointer over it, making it suddenly disappear. A lot of such phantom icons may pile up when developing a new application that installs a NotifyIcon but exits due to a fatal exception or a debug session being stopped in the middle. This utility will take care of Tray Icon clean-up automatically.The Icon Tray The Icon Tray is one of many windows managed by the Windows Explorer. It is in fact a toolbar holding a lot of buttons. Some of these buttons are hidden while others are visible. For each button, the Explorer holds a "process image name," which is the filename of the process that created the NotifyIcon.There is no direct support for manipulating the Icon Tray in the .NET Framework, so we need a lot of P/Invoke stuff to call Win32 functions, first to locate the right toolbar and then to enumerate the buttons and get their file names, i.e. the filenames of the processes that created them. The final step is to delete the icons without filenames, i.e. the filename gets replaced by null when the process exits.The programThe program is simple. It does not show a Form; it simply shows yet another NotifyIcon. It offers a ContextMenu with three MenuItems: periodic run (runs every 5 seconds, checked by default), run now (for an immediate single run) and quit. When the TrayIconBuster attempts to remove phantom icons, it first locates the correct ListView. Then it enumerates all icons a first time looking for its own icon (more on that later). Next it enumerates all icons again and removes the ones without a file name associated to them. There are basically four source files. Those are the main Form, the TrayIconBuster and two help classes: LP_Process and LP_Pinner.


TrayIconBuster Related Software