VB6 help

kmmatney

Diamond Member
Jun 19, 2000
4,363
1
81
Here is the simplest way:

1) First, make your own menu, using the menu editor. Assume your menu is called "mnuTest".

2) In the Mouse-down event of the text box use the code:

Private Sub Text1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)

If Button = 2 Then
Text1.Enabled = False
PopupMenu mnuTest
Text1.Enabled = True
Text1.SetFocus
End If


End Sub


There are better ways to do this, but this is the simplest. If you want to get rid of the right menu altogether, you'll need to use a few API calls.