Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: System tray, Shell_NotifyIcon, and Toolbar control equals problem


Message #1 by Greg Bates <gbates@e...> on Mon, 24 Jun 2002 17:55:42 -0700
Thanks, Marco.  I appreciate the info.

So is there any reliable way to manipulate system tray icons, and 
communicate with them, using VB?  I am using VB6, btw.


> I have the idea that the toolbar is subclassing the form.
Using the example from M$, the icon sends a mouse_move event to the
main form with a very small Y parameter, which means  that the event
is intercepted by the toolbar when is docked on the top of the form.

There is another problem with the example you are using: if you move
the mouse when the right button is pressed in your form (not in the
icon) and the x position is exactly 512 (the WM_LBUTTONDOWN event)
times TwipsPerPixelX, you get a common dialog... same as for double click

Sending a mouse event is an hack, not a solution, but M$ is not clear
about it. The only real solution is subclassing the main form so it is
possible to identify the tray icon events.

Marco

  Return to Index