Thread: MDI children always maximized?

  1. #1
    Registered User
    Join Date
    Jan 2008
    Posts
    244

    MDI children always maximized?

    hi there

    i have a problem here: i have a parent form with a couple of MDI children. they all must be _ALLWAYS_ maximized.

    i already realized that there is no minimize, close or restore box and i have implemented a toolstrip with buttons to toggle between those children.
    but sometimes they get restored from maximized to normal.
    then i have to do
    Code:
    WindowState = FormWindowState.Maximized;
    which causes the window to animate. so every time i toggle between those children, i get this animation.

    my simple question is: how do i keep those children allways maximized?
    this is for an application where every task has his own child form instead of a tab in one form.

    thanks in advance

  2. #2
    30 Helens Agree neandrake's Avatar
    Join Date
    Jan 2002
    Posts
    640
    Check out MSDN for window styles you can set on MDI children windows. Some combination should get it set that they can't be un-maximized.
    Environment: OS X, GCC / G++
    Codes: Java, C#, C/C++
    AOL IM: neandrake, Email: neandrake (at) gmail (dot) com

  3. #3
    Registered User
    Join Date
    Jan 2008
    Posts
    244
    yea thats what i actually tried, but what exact combination is it (C#)?

  4. #4
    Registered User
    Join Date
    Mar 2005
    Location
    Mountaintop, Pa
    Posts
    1,058
    Quote Originally Posted by Devils Child View Post
    yea thats what i actually tried, but what exact combination is it (C#)?
    Well, if you're referring to C# programming, give the following a try when you create the child windows:

    Code:
     //Get the rectangle describing the primary display
       rect = System.Windows.Forms.Screen.PrimaryScreen.Bounds;
    
       //Set our window to cover the entire display
       this.ClientSize = rect.Size;

  5. #5
    Registered User
    Join Date
    Jan 2008
    Posts
    244
    that's actually a great idea:
    Code:
    Location = new System.Drawing.Point(0, 0);
    			ClientSize = new System.Drawing.Size(Parent.Width, Parent.Height);
    set the window to cover everything.
    thanks

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Linux Putting my children to sleep with futex!?
    By Abs in forum Linux Programming
    Replies: 18
    Last Post: 02-12-2009, 06:43 PM
  2. Inserting text into MDI program
    By Rutabega in forum Windows Programming
    Replies: 0
    Last Post: 12-23-2005, 11:25 AM
  3. mdi workspace
    By Elyubarov in forum Windows Programming
    Replies: 10
    Last Post: 04-03-2005, 03:40 PM
  4. forks and children
    By suigeneris in forum C Programming
    Replies: 1
    Last Post: 01-22-2005, 05:48 AM
  5. "Which parent has children with no children"?!?
    By SMurf in forum C Programming
    Replies: 2
    Last Post: 04-28-2003, 01:59 PM