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
Apr 8, 1999

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.

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