You will have to do more subclassing. Unfortunately I am not at a position to provide a working example at the moment. I believe that we've discussed this before (maybe for a text box??). Do a keyword search.
Define a menu item with a blank caption
Name it "mnuIgnore" (or whatever)
Make it invisible
in the MouseDown event for the control
Code:
On Error Resume Next
If Button = vbRightButton Then PopupMenu mnuIgnore
Attempting to Pop Up a menu with no sub-menus generates an error that you just throw away. No menu appears and, because it's invisible, it doesn't appear on the menu bar.
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.