Showing posts with label MDI. Show all posts
Showing posts with label MDI. Show all posts

Tuesday, November 20, 2012

Creating MDI Child Forms

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 create a MDI Child form in a C# Windows Application and associate it with the MDI Parent form.

First let us create the MDI Parent Form.

Monday, November 19, 2012

Add Menu to 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 Menu control to an MDI Parent Form.

Creating MDI Parent Forms

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 create a MDI Parent form in a C# Windows Application.

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. Notice that the Form UI Changes as follows.


MDI Applications (Multiple-Document Interface)

A C# Windows application usually allows only a single Form to be opened at any given point in time, this works fine for smaller applications, but when we need to develop larger applications, we need a comprehensive menu structure to navigate through the various forms, this is where the MDI Applications help us.

Multiple-Document Interface (MDI) application, are those which have a MDI parent form, this form will be the parent of all the other forms in the Application, typically this form will contain the Menu which is used to navigate to the other forms in the application. 

A form in an MDI application is set as the MDI Parent by setting the IsMDIContainer property to true. Once this property is set to true, this form will act as the Parent form for the application. We can add Menu control to this form.