[python-win32] Cleanly Close System Tray Process

Gregory Piñero gregpinero at gmail.com
Tue Aug 1 20:24:14 CEST 2006


Hi guys,

I've got this little yellow icon sitting in my system tray:
http://i7.tinypic.com/21n08ig.png

I'd like to use the windows API to somehow ask it to shutdown?  If a
system tray icon counts as a window then perhaps I could get its hwnd
and do something like:
win32gui.PostMessage(hwnd, win32con.WM_CLOSE, 0, 0)
?

FYI so far I've been closing it with kill process but the problem is
that it leaves the icon in the system tray and after a few days of
opening and closing this thing I have 1000's of icons left over in the
system tray.

Much thanks!

-- 
Gregory Piñero
Chief Innovation Officer
Blended Technologies
(www.blendedtechnologies.com)


More information about the Python-win32 mailing list