VB6: Suppressing default context menu in textbox

Hi, i am having a few problems with the Textbox control.

I want to disable the default context menu in the control WITHOUT displaying one of my own in.

I have tried looking on google and many examples, ones that do not include a menu do not seem to work.

I have the following alternatives:

1) Change every TextBox to RichTextBox control, which means changing roughly 200 controls.
2) Display this menu somewhere off screen (don't know whether this is possible as a pop up menu requires interaction before becoming invisible)
3) Using Subclassing, which does not seem to work.

Are there any other alternatives that i haven't tried, or any code that you have that will solve this problem

Thanks in advance

Neutrinohunter

neutrinohunterAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Harisha M GEngineerCommented:
0
RubynCommented:
Place one text box on the form
Place a menu for pop up

Private Sub Text1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbRightButton Then
    Text1.Enabled = False
    Call PopupMenu(mnu)
    Text1.Enabled = True
End If
End Sub
0
RubynCommented:
This will be better

Private Sub Text1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbRightButton Then
    Text1.Enabled = False
    Text1.Enabled = True
    Call PopupMenu(mnu)
End If
End Sub
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
neutrinohunterAuthor Commented:
mgh: Get a problem with AddressOf Operator
Rubyn: Brings up both menus
Rdwillet: brings up original textbox in the first.

I have found what i wanted from another topic i thought id closed, so split points.

Thanks

Neutrinohunter
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.