
A tip for all that use system tray menus
Do you have this problem ?
your menu pops up, but it won't go away when you click away from it
eg. you click on the desktop and the sucker just stays there.
REASON
A bug in windows 95
SOLUTION
Put this declare in a bas module or make it a private, if you want to put
in you forms declarations section.
Declare Function SetForegroundWindow Lib "user32" (ByVal hwnd As Long) As
Long
(All on one line)
Add this line to the sub / function
that tests the state of the Systray icon
e.g. yourcontrol_mousemove(.........
SetForegroundWindow XXXXX.hwnd
where XXXXX is the name of your main form
That is all there is to it
Code tested in Vb4 and vb5
--
Replace # with e