Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

open a menu in VB

Status
Not open for further replies.

seba18

Programmer
Jul 26, 2004
38
How can i open a menu when I right-click on a form, or when I click on a command button?

If that is possible, then how will I create the menu.

Thank you for eventualy answers!
 
Hi,

Add a menu to your form using the Menu Editor in VB (Tools > Menu Editor). Set the Visible property of your menu's Title to False if you only want the menu to appear as a popup and not also on the form itself.

In the Click even of the command button or form use the PopupMenu command to show the menu.

Eg: PopupMenu MyMenu

where MyMenu is the Name property of the menu you want to display.


- Andy
___________________________________________________________________
If you think nobody cares you're alive, try missing a couple of mortgage payments
 
thank's AndyGroom!

I figured out how to do that, but now I need to make an non-border form (border="0 - None"), but with the menu on the form(even if the menu is invisible), I can't do that. Anyone can hep me?
 
Hi,

There's no reason why the menu has to be on the same form, you could create a new form with the menus on it and then do:

PopupMenu Form2.MyMenu


- Andy
___________________________________________________________________
If you think nobody cares you're alive, try missing a couple of mortgage payments
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top