|
|
Title | Make a popup menu |
Description | This example shows how to use a popup menu in Visual Basic 6. |
Keywords | popup menu, popup, context menu, PopupMenu |
Categories | Controls, Software Engineering |
|
|
Make a top-level menu and set its Visible property to False.
In the MouseDown event handler where you want to display the menu, make sure the right button is pressed and then use PopupMenu to display the menu.
|
|
Private Sub Form_MouseDown(Button As Integer, Shift As _
Integer, X As Single, Y As Single)
' Make sure it's the right button.
If Button And vbRightButton Then PopupMenu mnuPopup
End Sub
|
|
|
|
|
|