Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How to make a new MDI child form maximum size?

How to make a new MDI child form maximum size?

Scheduled Pinned Locked Moved C#
tutorialquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    fantasy1215
    wrote on last edited by
    #1

    I had a MDI WinForm Program, when click from a menu item, I new a new child WinForm(this child WinForm designed in the designer), but this new child WinForm is not maximumed even I set the childForm.WindowState = System.Windows.Forms.FormWindowState.Maximized; Could you show me how to do this? Thanks in advance!

    K 1 Reply Last reply
    0
    • F fantasy1215

      I had a MDI WinForm Program, when click from a menu item, I new a new child WinForm(this child WinForm designed in the designer), but this new child WinForm is not maximumed even I set the childForm.WindowState = System.Windows.Forms.FormWindowState.Maximized; Could you show me how to do this? Thanks in advance!

      K Offline
      K Offline
      Karthik Harve
      wrote on last edited by
      #2

      if you want this child to be open as a separate maximized form then try this below code..

      //menu click event in MDI parent

      CHildForm frm = new CHildForm();
      frm.WindowState=FormWindowState.Maximized;
      frm.ShowDialog();

      [or] if you want this child to be open as maximized within the MDI parent, then try this..

      //menu click event in MDI parent

      CHildForm frm = new CHildForm();
      frm.WindowState=FormWindowState.Maximized;
      frm.Show();

      hope this hepls.

      with regards Karthik Harve

      F 1 Reply Last reply
      0
      • K Karthik Harve

        if you want this child to be open as a separate maximized form then try this below code..

        //menu click event in MDI parent

        CHildForm frm = new CHildForm();
        frm.WindowState=FormWindowState.Maximized;
        frm.ShowDialog();

        [or] if you want this child to be open as maximized within the MDI parent, then try this..

        //menu click event in MDI parent

        CHildForm frm = new CHildForm();
        frm.WindowState=FormWindowState.Maximized;
        frm.Show();

        hope this hepls.

        with regards Karthik Harve

        F Offline
        F Offline
        fantasy1215
        wrote on last edited by
        #3

        Actually, I am doing this, this doesn't work. Maybe some property I've set wrong?

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups