neutrinohunter
asked on
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
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
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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
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
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