Tuesday, November 20, 2012

Add Toolbar to a MDI Parent Form

MDI (Multiple-Document Interface) applications should have a MDI Parent form which will act as the parent for all other forms in the application. In this post we shall see on how to add a Toolbar control to an MDI Parent Form.


1. Create a new / open an existing C# Windows application.
2. Create/Open the form which needs to be set as the MDI Parent form.
3. Open the Properties of the form (View -> Properties Window or Press F4 key)
4. Set the IsMdiContainer property to true.
5. Open the controls Toolbar, drag a ToolStrip control under the Menus & Toolbars section on the MDI Form.
6.
Open the Properties window of the ToolStrip control.
7. Open the
Items Collection Property of the ToolStrip control.
8. Add as many tool Bar buttons as required.
9. The
DisplayStyle, property of the buttons determine on whether the Text or Image or both are to be displayed in the Toolbar, here we will set it as Text.
10. Close the Items collection dialog Box.
11. Double click on the Toolbar button to create the event handler and add the required code.



Search Flipkart Products:
Flipkart.com

No comments: