devxlogo

Popup Menu

Question:
I wish to add my application to the popup menu that you get in Windows 95/98. I am referring to the menu that pops up whenever you click on the desktop or in Explorer. This menu allows the user to bring up details on a file, send a file to somewhere, and hosts applications such as Winzip. How do I add my program to this menu from inside VB when my app is running?

Answer:
1. Using the Menu Editor (Tools menu), create a menu and submenus. Only a submenu can be displayed as a popup menu.
2. In the click event of the submenus, add code to provide the functionality you want.
3. In the MouseDown event on the form, check if the right button is down.
4. Call the form’s PopupMenu method specifying the parent menu as the argument: PopupMenu MenuName.

Charlie has over a decade of experience in website administration and technology management. As the site admin, he oversees all technical aspects of running a high-traffic online platform, ensuring optimal performance, security, and user experience.

See also  How Engineering Leaders Spot Weak Proposals

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.