Toolbar menus

Delta
12-17-2001, 01:27 PM
Is it possible to get a menu on the toolbar when it is right clicked on?

Volte
12-17-2001, 01:58 PM
Yes,
First thing you do is use the standard VB menu editor to create your menu, then set the Visible property of the top-level menu (i.e. File, Edit, View, etc) to False. Then in the MouseDown event, put some code in something like this:<pre>If Button = vbRightButton Then
PopupMenu mnuPopup <font color=green>' mnuPopup would be whatever your menu name is</font color=green>
End If</pre>

One thing that may come in handy is you should leave the Visible property at True, but set it to False on Form_Load, this way you can still see your menus at design time, making it easier to access their code windows.

Delta
12-17-2001, 03:16 PM
Great, thanks :)

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum