What is the best method of using native menus in C#?
Edit:
I want to use the native menu because it’s better looking than the ugly .NET menu.
Can someone explain to me exactly how I can use it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In the System.Windows.Forms namespace, you’ll find the classes:
Menu,ContextMenu,MenuItem,MenuStrip,ContextMenuStrip,ToolBar,ToolStrip, and others.These classes are simply wrappers around the Win32 API calls that implement these controls natively. The same is true for nearly every class in the System.Windows.Forms namespace; when you use these classes, you’re actually using the native controls.
So the best method of using native menus in .NET is to use the controls .NET provides for to display menus, as mentioned above. Whichever ones you use depends on what you’re trying to accomplish. The simplest option for attaching a main menu to a form is using the
Menuobject, populated with aMenuItemset.