System.Windows.Forms 1.0.5000.0 2.0.0.0 System.Windows.Forms.Menu System.ComponentModel.ToolboxItemFilter("System.Windows.Forms.MainMenu", System.ComponentModel.ToolboxItemFilterType.Allow) The control represents the container for the menu structure of a form. A menu is composed of objects that represent the individual menu commands in the menu structure. Each can be a command for your application or a parent menu for other submenu items. To bind the to the that will display it, assign the to the property of the . For applications that will have support for multiple languages, you can use the property to display the text of the menu from right to left to support languages such as Arabic. You can create different objects to represent different menu structures for your form. If you want to reuse the menu structure contained in a specific , you can use its method to create a copy. Once you have a copy of the menu structure, you can make the appropriate modifications for your new menu structure. Cutting and pasting menu items from one form to another in the designer might not work as expected if the form you are pasting into has no menu items defined. Represents the menu structure of a form. Although replaces and adds functionality to the control of previous versions, is retained for both backward compatibility and future use if you choose. Constructor This version of the constructor creates a without any specified objects. To add menu items to the control use the other version of this constructor that accepts an array of objects as its parameter or use the method of the property. Initializes a new instance of the class without any specified menu items. 1.0.5000.0 2.0.0.0 Constructor To be added. Initializes a new instance of the class with the specified container. An representing the container of the . 2.0.0.0 Constructor You can use this constructor to assign an array of objects to the at the time of its creation. After the has been created you can add additional objects to the using the method of the property. Initializes a new instance of the with a specified set of objects. An array of objects that will be added to the . 1.0.5000.0 2.0.0.0 Method System.Windows.Forms.MainMenu You can use this method to create a copy of the menu structure stored in a . You can use this method to reuse the menu structure stored in a as the foundation for a new . For example, if you want to create a menu structure that has the same menu items as an existing but will also have additional objects added to it, you can use the method to create a copy of the original and then add the new objects to the cloned . Creates a new that is a duplicate of the current . A that represents the cloned menu. 1.0.5000.0 2.0.0.0 Event 2.0.0.0 System.EventHandler For more information about handling events, see Consuming Events. Occurs when the main menu collapses. Method System.IntPtr To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 Method System.Void Call when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the memory it was occupying can be reclaimed by garbage collection. Always call before you release your last reference to the . Otherwise, the resources the is using will not be freed until garbage collection calls the object's destructor. Disposes of the resources, other than memory, used by the . true to release both managed and unmanaged resources; false to release only unmanaged resources. 1.0.5000.0 2.0.0.0 Method System.Windows.Forms.Form This property enables you to determine if a specific is parented to a form. The property is typically used when multiple objects are being used on a form and you need to determine which one is currently being used by a form. Gets the that contains this control. A that is the container for this control. Returns null if the is not currently hosted on a form. 1.0.5000.0 2.0.0.0 Method 2.0.0.0 System.Void Raising an event invokes the event handler through a delegate. For more information, see Raising an Event. The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. Raises the event. An that contains the event data. Property System.ComponentModel.AmbientValue(System.Windows.Forms.RightToLeft.Inherit) System.ComponentModel.Localizable(true) System.Windows.Forms.RightToLeft To be added. This property enables your menus to support languages that are written from right to left. When this property is set to RightToLeft.Yes, the menu item text will be displayed from right to left instead of the default left to right method. For more information about how enabling right-to-left alignment affects Windows Forms controls, see the property. Gets or sets whether the text displayed by the control is displayed from right to left. 1.0.5000.0 2.0.0.0 Method System.String The return string includes the type and the string returned by the method if the is assigned to a form. Returns a string that represents the . A string that represents the current . 1.0.5000.0 2.0.0.0