Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB3 and that pesky Win 98 right-click popup menu

Status
Not open for further replies.

StuH

Programmer
Mar 25, 2001
53
AU
I have a question and am wondering if you can help.

I have been put in charge of a VB3 16-bit app that has a little problem. It's using a MouseDown event on a text box to detect a right mouse click. Upon this, it successfully opens a new form (a pop-up box for selecting stuff from), but when run on a Win 98 PC and I suppose other 32 bit windows platforms, the default Windows right-click popup menu is also displayed.

Do you know is there any way of supressing/disabling the default menu from the VB3 app?

Thanks,

Stuart Hasic
Sydney Australia.
 
Nobody replied :(

But I worked it out anyway! Here's the solution (two possible ways of doing it):

1)

Private Sub MouseDown ....

Text1.Enabled = False
Text1.Enabled = True
frmPopup.Show

OR
2)

Text1.Enabled = False
frmPopup.Show
Text1.Enabled = True

The first method, that works with VB3, 4 and 6 on 9x, doesn't give the
appearance that the textbox became disabled. The second method will
disable keyboard input until closed if the popup form is shown modally. This
won't affect the ability to set the text contents by code.

If anyone else wanted to know, there it is!

Stu.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top