Windows XP Balloon Tips?

Dave Brueck dave at pythonapocrypha.com
Mon Oct 11 13:07:50 EDT 2004


Daniel Bickett wrote:
> I liked the way GTray told me when I had new mail using the balloon
> tip, and so when I replicated the program in python for use with
> Private Messages on message boards, I naturally was interested in how
> to achieve the same result.
> 
> I've searched comp.lang.python, google, the python chm, and the python
> for windows chm, and none of them have yielded a single result.
> When the Python for Windows docs didn't have anything I figured it
> just wasn't possible yet, but I decided to ask here anyway. So, does
> anyone know of a way to use the Windows XP Balloon Tip feature with
> python? (namely wxPython, considering that's the GUI I use)

Yep, very possible - we use it in one of our apps (the internal debate wrt 
whether or not we should have a tray icon is another story ;-) ). If you just 
need to display the balloons then you can use ctypes to call the 
shell32.Shell_NotifyIconA function (Google for NotifyIcon on MSDN to learn the 
gory details).

If you also want to receive messages (mouse over, click, etc.) then you'll need 
to set up a message loop to handle the MSG_ICON_NOTIFY message - I used Venster 
for that.

-Dave



More information about the Python-list mailing list