Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7558269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T12:19:40+00:00 2026-05-30T12:19:40+00:00

There is the good component to maximize a child window in a client area

  • 0

There is the good component to maximize a child window in a client area (the SHIFT key must be held) – NLDExtraMDIProps.

Or this code can be used:

procedure WMSIZE(var Msg: TMessage); message WM_SIZE;

procedure TForm2.WMSIZE(var Msg: TMessage);
begin
  inherited;
  if Msg.WParam = SIZE_MAXIMIZED then
  begin
    ShowWindow(Handle, SW_RESTORE);
    Left := 0;
    Top := 0;
    Width := Form1.ClientWidth - 4; // The BORDER
    Height := Form1.ClientHeight - 4;
  end;
end;

But maximizing isn’t real maximizing. The child window is only aligned to the client area. It must automatically resize and fit the client area when the parent window is resized, the maximize/restore system button must change etc.

I try to accomplish effects that are described below.

As you see on the pictures the child windows are maximized, and

  1. they don’t take the entire parent window (only the client area).

  2. It’s impossible to move them over the caption/title bar because they are maximized.

  3. They have the restore button, not the maximize button any more.

  4. They are aligned to the client area (resizing of the parent window causes resizing of the child one withing the client area).

The code in my question and the component don’t do like the child windows on the pictures.

Can we make a window really maximized (not just aligned)?

Not maximized (not good; the component and the code from my question maximize like on these pictures):

enter image description here enter image description here

Maximized (what I need):

enter image description here
enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T12:19:42+00:00Added an answer on May 30, 2026 at 12:19 pm

    I do not understand your problem. Maximizing an MDI child window is done:

    • programmatically: by using ShowWindow(ActiveMDIChild.Handle, SW_MAXIMIZE),
    • manually: by clicking the Maximize border icon, or by double clicking on the form caption.

    Both these actions result in:

    • the disappearance of the child window border (collapses into the MDI form border),
    • the addition of small border icons (for the child window) to the main menu bar,
    • a resize effect similar to that of Align=alClient.

    To restrict the available space for the child windows within the main form, make sure to align windowed controls to edges of the form.

    Setting the Align or Anchors properties for MDI child windows has no effect: they are not part of the default VCL aligning implementation anymore; Windows has taken over that job.

    If you want to intervene on the resizing of an MDI child, then handling WM_SIZE is the wrong approach, because that message is send áfter the resize. Instead, handle WM_SYSCOMMAND as I explained here.

    As for my component that you refer to:

    • Manually maximizing by clicking the Maximize border icon does exactly thát: a default maximize operation as outlined above,
    • Manually maximizing by clicking the Maximize border icon – while holding the Shift key – does resize the child window to the largest spare space within the MDI form. In this case, resizing the MDI main form does nót resize the MDI child forms.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a good .Net component for drag/drop/resize drawing in 2D with connections (like
Is there good example code or a test project for explaining the Model–view–presenter (MVP)
here's my questions: is there a good asp software component for creating + sending
Are there any good themes or component libraries for GWT? The built-in themes are
Are there any good overlay component library for both lightweight and heavyweight components? Is
I've found a good component to implement a Caption<->Value List for ComboBox: Is there
Are there good reasons why it's a better practice to have only one return
Are there good efficiency savings using Sql Server 2005 over Sql Server 2000? Or
What are the tensions between multithreading and exception-safety in C++? Are there good guidelines
Is there any good way to deal with the class renaming refactor from Resharper

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.