How to: Append a MenuStrip to an MDI Parent Window (Windows Forms)
The Menu class is menu foundation of strip functionality in Windows Forms. If you have worked with menus in. Net can create a MenuStrip control using a Forms designer at design-time hot tits cum using the MenuStrip class in code strip run-time or dynamically.
Once a MenuStrip net on the Form, you can add menu items and set its properties and events. Creating a MenuStrip control at run-time is merely a work of creating an instance of MenuStrip class, set its properties and adds MenuStrip class to the Form controls.
10. Menu Strip
First step to create a dynamic MenuStrip is to create an instance of MenuStrip class. The following code snippet creates a MenuStrip control object.
In the next step, you may set properties of a MenuStrip control. The following code snippet sets background color, foreground color, Text, Name, and Font properties of a MenuStrip. Once the MenuStrip control is ready with its properties, the next step is to add the MenuStrip to a Form. To do so, first we set MainMenuStrip property and then use Form.