A tip for all that use system tray menus 
Author Message
 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.


A bug in windows 95


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

(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

Thu, 26 Oct 2000 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. System Tray Tip

2. System Tray Tool Tips

3. Q: Problems with System Tray functionality in VB5 and question about TaskBar/System Tray

4. Multi-line Icon Tray Tool Tips using VB

5. How to release Popup Menu from system tray?

6. System Tray Icon Menu won't dismiss

7. System Tray Menu Persists/Won't go away

8. Pop-Up menu's in the System Tray

9. TaskIcon.OCX for show icon and popup menu in system tray

10. System Tray icon with popup menus

11. Popup menu on system Tray Icon

12. System tray menu stays too long


Powered by phpBB® Forum Software