CodeItBetter Programming Another VB Programming Blog

How to create a popup menu

Posted on July 9, 2011
1
2
3
4
5
6
7
8
9
'Forms - How to create a popup menu
'Simple short piece of VB code which demonstrates how to create a popup menu.

'Put the following code in the form's MouseDown event
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
     If Button = 2 Then ' if right mouse button is pressed
        PopupMenu mnuFile  ' popup mnuFile
     End If
End Sub
Filed under: Forms Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


 

No trackbacks yet.