Create a Pop Up Menu from a label or button

By | 2002-06-01

MAKE A POPUP MENU APPEAR WHEN YOU CLICK A LABEL OR COMMAND BUTTON! EASY! ONE SIMPLE LINE OF CODE! (o:

Original Author: SeeD

Assumptions

‘OK, follow these instructions
‘ 1) Open a new project in your Vb, and make 2 new forms.
‘ 2) On form number 2, make a menu with as many submenus as you’d like.
‘ 3) Now you should have 2 new forms. Form 1 should be completely blank, ‘and form 2 should have a menu bar with some stuff. (You don’t have to make ‘these practice menu items work yet.)
‘ OK, now just put the code below into a label or command button!

Code

Form2.PopUpMenu Form2.Menu1, 1
'In place of Menu1 put your menus name, as in file.
'u should have no problems. Thanks

Author: dwirch

Derek Wirch is a seasoned IT professional with an impressive career dating back to 1986. He brings a wealth of knowledge and hands-on experience that is invaluable to those embarking on their journey in the tech industry.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.