Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
XML RSS Feed
 
 
 
 
 
 
 
 
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
 
 
 
TitleMake a popup menu
DescriptionThis example shows how to use a popup menu in Visual Basic 6.
Keywordspopup menu, popup, context menu, PopupMenu
CategoriesControls, 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
 
 
Copyright © 1997-2003 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated