Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create A Menu In Code
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Create A Menu In Code
Miscellaneous
Thread ID:
01410761
Message ID:
01410761
Views:
97
I'm trying to add a menu to a form programaticaly. Spending alot of time on Google today.

I was able to get it working using:
MainMenu mnuMain = new MainMenu();

MenuItem padFile = new MenuItem("&File");

mnuMain.MenuItems.Add(padFile);

MenuItem barNew = new MenuItem("&New...");
padFile.MenuItems.Add(barNew);

barNew.Click += new EventHandler(OnMenuBarNewClick);

this.Menu = mnuMain;
This works just fine, except the menu bar comes out gray and the menu itself is white. The MenuStrip has a rendermode property but it doesn't exist on the MainMenu class. Also the Menu property of a form expects a MainMenu, not a MenuStrip.

1) What's the difference between the two.
2) How do I change the look of the MainMenu
3) How do you create a MenuStrip and add it to a form?

Thanks
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Next
Reply
Map
View

Click here to load this message in the networking platform