Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Visual Basic
Expertise: Beginner
Nov 9, 1999

Creating Submenus During Run Time

Question:
I'm trying to create a drop-down sub menu in a VB form. I've tried almost every applicable API32 call and have not been able to do it.

Answer:
If you are simply trying to create a menu with a subitem you can do so in the Menu Editor; creating a top level menu and indenting, then adding the next menu item.

If you are trying to create a context menu (a menu that appears on a right click event), you can create a regular menu and submenu as described above, then, on the MouseDown event of the form check if the right mouse button is pressed down and call the Form's PopupMenu method followed by the name of the top-level menu.

DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date