How to Add a Right Click/Pop-up Mouse Menu.
![Visual Basic 6, or VB Classic Visual Basic 6, or VB Classic](https://www.fortypoundhead.com//assets/img/icons/v7/vb6.png)
Step by Step on how to How to Add a Right Click/Pop-up Mouse Menu to your project.
Original Author: KaveMan
Code
How to Add a Right Click/Pop-up Mouse
Menu.
Step 1:
Start a New Standard .EXE Project
Step 2:
Click on Tools > Menu editor (Opens Menu Editor Dialog)
Step 3:
Put 'Menu1' in the Caption then put 'MenuOne' for the
Name. Click the 'Next' Button.
Step 4:
Put 'Test1' in the Caption then put 'TestOne' for the
Name. Now click on the arrow that is pointing right (You should see four
dots next to Test1). Then click the 'OK' button.
Step 5:
Go to the Visual Basic Menu and click on View > Code and
add this:
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 2 Then
Form1.PopupMenu MenuOne
End If
End Sub
Step 6:
Click on Run > Start (or press the 'F5' button on the
keyboard).
Notes:
Button 1 = Left Mouse Button
Button 2 = Right Mouse Button
Button 3 = Explore Left Mouse Button
Button 4 = Middle Mouse Button
Button 5 = Explore Right Mouse Button
Loading Comments ...
Comments
No comments have been added for this post.
You must be logged in to make a comment.