Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
 
 
 
500MB 27GB Web Hosting - $9.95/Month
 
 
 
 
 
Old Pages
 
Old Index
Site Map
What's New
 
Books
How To
Tips & Tricks
Tutorials
Stories
Performance
Essays
Links
Q & A
New in VB6
Free Stuff
Pictures
 
 
 
TitleGive a form a popup menu
Keywordspopup menu, context menu, right click
CategoriesControls, Tips and Tricks
 
In the menu editor, create a menu named mnuPopup. Set its Visible property to False and give it the menu items you want to display on the popup.

In the form's MouseDown event handler, look for the right mouse button. When you see it, use the PopupMenu command to display the popup menu.

 
' On right click, display the popup.
Private Sub Form_MouseDown(Button As Integer, Shift As _
    Integer, X As Single, Y As Single)
    If Button = vbRightButton Then
        PopupMenu mnuPopup
    End If
End Sub
 
 
Copyright © 1997-2003 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated