Make pop up menu close with executable
Posted on 2006-06-10
I have an app that is minimized as an icon in the system tray written in VB6. When I right click on the icon, it pops up a menu.
I use this code:
The problem is when the menu pops up, if I don't click on anything and go back to something else, the menu does not close.
I put this in the forms Lost Focus event:
That works fine when I run it from vb. The menu closes if I click somewhere else. But when I make it into an executable, then it stops working. The menu does not close. I don't understand why.
Anybody have a suggestion?