Here's a function to remove dead icons from the Notification Area (Tray). When an application dies, its icon isn't always removed. The simple solution is to mouse over the icon and it will vanish. Thats pretty much what this function does; it programatically mouses over the tray and removes any dead icons. I used SetCursorPos() from the Windows API because it is far faster than MouseMove(). Its so fast, in fact, that all you should see is a brief flicker of your cursor and the icons vanish.