[python-win32] Cleanly Close System Tray Process

Metz, Bobby W, WWCS bwmetz at att.com
Tue Aug 1 21:42:42 CEST 2006


Does mousing over the icon not make it disappear after it's killed?  If you can get the handle to the process, say via EnumWindows, you can user the TerminateProcess API call.

Bobby

-----Original Message-----
From: python-win32-bounces at python.org
[mailto:python-win32-bounces at python.org]On Behalf Of Gregory Piñero
Sent: Tuesday, August 01, 2006 11:24 AM
To: python-win32 at python.org
Subject: [python-win32] Cleanly Close System Tray Process


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)
_______________________________________________
Python-win32 mailing list
Python-win32 at python.org
http://mail.python.org/mailman/listinfo/python-win32


More information about the Python-win32 mailing list