I have a systray program running with popupmenus on the mouse buttons 1 and 2. If click on my app the menu appears but if I then (and here is the problem) click outside of the popup the popup does not disappear.
Probably. The issue is the way that VB's implementation of popup menus interacts with NT. I'd guess that the problem would very likely remain under XP Pro.
It's looking for an entry. When you make a Pop-Up in VB it acts like a message box, it's won't go away until you choose something. There are 1 of 2 things you could do/try.
1) Cancel Item
You could make an item on your menu called Cancel. You don't even need to put code in it. Just have a menu item that says Cancel, they choose it the menu goes away.
2) Try something with mouse move
See if the Pop-Up menu will react / respond to mouse move events. Or try to get the Twips of the Pop-Up when it pops up. The as soon as the mouse is up, set a timer control to check where the mouse is, if the mouse is not on the menu then set another timer, if the mouse doesn't return to the menu within 3 seconds on the second timer then close the menu...
I'm going to try the 2nd one, if it works I'll let you know. Craig, mailto:sander@cogeco.ca
Remember not to name the Lambs...
It only makes the chops harder to swallow
I too am having the same problem, but in Microsoft Windows 98 using Visual Basic 6.0 Pro.
I've looked right through the list of events, but have found none that could be used to solve the problem.
I'm using a data bound grid control with a popup menu that appears when you right click on a row. But then I want the menu to disappear and another appear wherever the user clicks with the right mouse button. I notice you can do that in Internet Explorer and mostly every other program, but HOW?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.