You are on page 1of 1

Creating popup menu

It is also a list of commands that can be invoked anywhere on the interface by using the
mouse down action. It may be created for the each object on the interface while the
dropdown menu is available only on the menu bar.

Popumenu calls by the popupmenu function into visual basic. It hides the its basic name on
the screen or interface where as the dropdown menu always displays on the menu bar.
Popup menu is created with the same process like dropdown menu.

It is also called context menu and while the menu available on the menu bar is called
dropdown menu.

Popup menu uses separately for each object on the interface while the dropdown menu
uses commonly for each object on the interface.

How does it invoke on the interface

Code here

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


If Button = vbRightButton Then
Text1.Enabled = False
PopupMenu mnuedit
Text1.Enabled = True
End If
End Sub

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


If Button = vbRightButton Then
Text1.Enabled = False
PopupMenu mnuedit
Text1.Enabled = True
End If

End Sub

You might also like