Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. menu control

menu control

Scheduled Pinned Locked Moved C#
csharptutorialhelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    chithra r
    wrote on last edited by
    #1

    Hi all I want to create a Menu in my application.iam using menu control for that.when i use this menu control "one arrow mark is coming in between" the menu items.can anyone tell me how to remove this arrow mark.also post me a link that explains step by step process, how to create a menu control in .net(c#). any help will be appreciated. thanks in advance.

    pintoo

    J 1 Reply Last reply
    0
    • C chithra r

      Hi all I want to create a Menu in my application.iam using menu control for that.when i use this menu control "one arrow mark is coming in between" the menu items.can anyone tell me how to remove this arrow mark.also post me a link that explains step by step process, how to create a menu control in .net(c#). any help will be appreciated. thanks in advance.

      pintoo

      J Offline
      J Offline
      John_Adams
      wrote on last edited by
      #2

      Hi Pintoo, If you are referring to the SubMenu Items arrow then please know that it appear when we create some submenu items for a menu item like: FileMenu | | New-->SubMenuItemsList | | Open The arrow can be removed by removing the submenu items. However, regarding your query of "how to create a menu control in .net(c#)." I would like to mention that we can create menus using C# in the following manner: First add a MainMenu control to the form. Then to add menu items to it add MenuItem objects to the collection. By default, a MainMenu object contains no menu items, so that the first menu item added becomes the menu heading. Menu items can also be dynamically added when they are created, such that properties are set at the time of their creation and addition. The following program shows how to create a simple menu. The Class MenuTest1 creates a simple menu on a form. The form has a top-level File menu with menu items New,Open and Exit .The menu also includes a About menu. ------------------------------------------------------------------------- BEGIN CODE using System; using System.ComponentModel; using System.WinForms; using System.Drawing; public class MenuTest1 :Form { private MainMenu mainMenu; public MenuTest1() { mainMenu = new MainMenu(); MenuItem File = mainMenu.MenuItems.Add("&File"); File .MenuItems.Add(new MenuItem("&New")); File .MenuItems.Add(new MenuItem("&Open")); File .MenuItems.Add(new MenuItem("&Exit")); this.Menu=mainMenu; MenuItem About = mainMenu.MenuItems.Add("&About"); About.MenuItems.Add(new MenuItem("&About")); this.Menu=mainMenu; mainMenu.GetForm().BackColor = Color.Indigo; } public static void Main(string[] args) { Application.Run(new MenuTest1()); } } END CODE ------------------------------------------------------------------------- Hope this helps :).

      Regards, John Adams ComponentOne LLC

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups