How can I get MainMenu to appear in my Toolbox

A

Academia

In an old project I still use MainMenu and ContexMenu.

How can I get them to appear in my Toolbox?


Thanks
 
H

Herfried K. Wagner [MVP]

Academia said:
In an old project I still use MainMenu and ContexMenu.

How can I get them to appear in my Toolbox?

Righ-click the toolbox and choose the appropriate item to customize it.
MainMenu and ContextMenu are part of "System.Windows.Forms.dll".
 
A

Academia

Thanks that fixed it.

What I had before was the ContextMenu in the toolbox but no MainMenu. So I
added a ContextMenu and then ignoring
"Do not modify it using the code editor."

I changed ContextMenu to MainMenu and got what I wanted.

HOWEVER

This is in a UserControl and it appears that UserControl doesn't support
MainMenu because in the designer it shows the mainMenu at the bottom but
will not let me edit it.

Why do I want a MainMenu?

Because the MainMenu has a MenuClone which I use to create the ContextMenu
and to support a property the returns a clone so the form containing the
usercontrol can merge that menu with its own.

This way if I have two usercontrols, for example, on a form the form can
support all those menu items without doing anything except merging the
menus.

Any suggestions?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top