An MDI(Multiple Document Interface) is a graphical user interface within which multiple windows reside below one parent window. The opposite words of MDI are SDI(Single Document Interface) and TDI(Tabbed Document Interface).
As usual create a new project, look for IsMdiContainer property in your Forms' properties and make it True.
Add a new Windows Form
Now we'll need to add some code to Declare the child form and show so you can make a button or something but I am going to do this in the Form_Load event :
Now just debug your program and see what happens; you'll have a child form LOL.
Arranging the child Form/Forms :
Layout Cascade
Tile Vertical
Tile Horizontal
Arrange Icons
Thanks for reading this, this tutorial contains only the basics of MDI application.
As usual create a new project, look for IsMdiContainer property in your Forms' properties and make it True.
Add a new Windows Form
Now we'll need to add some code to Declare the child form and show so you can make a button or something but I am going to do this in the Form_Load event :
// Declaring the child form Form2 BabyForm = new Form2(); // Set the main form as a parent form BabyForm.MdiParent = this; // Show BabyForm.Show();
Now just debug your program and see what happens; you'll have a child form LOL.
Arranging the child Form/Forms :
Layout Cascade
this.LayoutMdi(MdiLayout.Cascade);
Tile Vertical
this.LayoutMdi(MdiLayout.TileVertical);
Tile Horizontal
this.LayoutMdi(MdiLayout.TileHorizontal);
Arrange Icons
this.LayoutMdi(MdiLayout.ArrangeIcons);
Thanks for reading this, this tutorial contains only the basics of MDI application.
1 comments:
we made a c# coding website on csharp codes
ReplyPost a Comment
Note: Only a member of this blog may post a comment.