Maximized MDI window at startup : MDI « GUI Windows Form « C# / C Sharp






Maximized MDI window at startup

Maximized MDI window at startup

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace MdiBasic
{
  public class frmContainer : System.Windows.Forms.Form
  {
    private System.ComponentModel.Container components = null;

    public frmContainer()
    {
      InitializeComponent();
            MdiBasic.frmChild child = new MdiBasic.frmChild(this);

            child.Show();
        }
    private void InitializeComponent()
    {
         this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
         this.ClientSize = new System.Drawing.Size(292, 273);
         this.IsMdiContainer = true;
         this.Name = "frmContainer";
         this.Text = "MDI Basic";
         this.WindowState = System.Windows.Forms.FormWindowState.Maximized;

        }
    [STAThread]
    static void Main() 
    {
      Application.Run(new frmContainer());
    }
  }

  public class frmChild : System.Windows.Forms.Form
  {
    private System.ComponentModel.Container components = null;

        public frmChild(MdiBasic.frmContainer parent)
    {
      InitializeComponent();
            this.MdiParent = parent;
        }
    private void InitializeComponent()
    {
      this.components = new System.ComponentModel.Container();
      this.Size = new System.Drawing.Size(300,300);
      this.Text = "frmChild";
    }
  }
}

           
       








Related examples in the same category

1.Set MDI parent windowSet MDI parent window
2.MDI formMDI form
3.MDI RelativesMDI Relatives
4.Form OwnershipForm Ownership
5.MDI BasicsMDI Basics
6.MDI and DockMDI and Dock
7.MdiLayout.Cascade MdiLayout.Cascade
8.MdiLayout.TileHorizontal MdiLayout.TileHorizontal
9.MdiLayout.TileVerticalMdiLayout.TileVertical