Add a Popup Menu to form with existing menu

I used menu editor to create a drop down menu across the top of one of my forms.  The menu is similar to:

File        Edit     Help

Save      Cut      Version
New      Paste    About
Open     Copy

I now want to add a popup menu to the form which shows when the user right clicks while some of the controls have focus.  How do I add the popup menu.  Every time I enter the menu editor for the form I see the existing menu but I want to create a totally new one.

Who is Participating?
On the same menu editor create your new popup menu and uncheck the visible box

On click or mousedown and or mouseup and button =2 add:
PopupMenu YourRightClick Menu Name

Create a new Main Menu Item:
Caption: Right Click  Name: mnuRightClick
Uncheck the Visible Box (in other words, it will not be visible in the main menu that appears on form)
Add SubMenu Items
Caption: Copy Name: mnuRCCopy
Caption: Edit   Name: mnuRCEdit

Example Code

Private Sub Text1_Click(Index As Integer)
    If Button = 2 Then PopupMenu mnuRightClick
End Sub
mlcktmguyAuthor Commented:
The instructions to build the menu are right on but the code to recognize the click doesn't seem to work.

The click events on my textbox does not have the (Index as integer)  parameter.  When i add it the compiler objects.
mlcktmguyAuthor Commented:
diregard last post, I found the Button and other variables in the mouse down event.

Thanks for the help.  You get the points
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.

All Courses

From novice to tech pro — start learning today.