Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / VB.NET / October 2007

Tip: Looking for answers? Try searching our database.

How can I get MainMenu to appear in my Toolbox

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Academia - 01 Oct 2007 15:16 GMT
In an old project I still use MainMenu and ContexMenu.

How can I get them to appear in my Toolbox?

Thanks
Herfried K. Wagner [MVP] - 01 Oct 2007 21:39 GMT
"Academia" <academiaNOSPAM@a-znet.com> schrieb:
> 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".

Signature

M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://dotnet.mvps.org/dotnet/faqs/>

Academia - 02 Oct 2007 14:00 GMT
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?

> "Academia" <academiaNOSPAM@a-znet.com> schrieb:
>> In an old project I still use MainMenu and ContexMenu.
[quoted text clipped - 3 lines]
> Righ-click the toolbox and choose the appropriate item to customize it.
> MainMenu and ContextMenu are part of "System.Windows.Forms.dll".

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.