Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

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



Application Security Testing: An Integral Part of DevOps

Creating Submenus During Run Time

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.

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.



We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.
Thanks for your registration, follow us on our social networks to keep up-to-date