How do I control the placement of an MDI child window (FormStyle := fsMDIChild) in Delphi or C++Builder? I know that I can set Left, Top, Position, and so on, but for an MDI child in particular, these don't take effect until after the window has already been created and shown in its default location. The result is that creating and positioning several windows at once results in a fair bit of flicker as windows are created in their default positions then immediately moved and resized.
From delving into the VCL source, the only solution I've been able to find is to override TCustomForm's CreateParams method and change the X, Y, Width, and Height fields of the Params parameter, but that feels like a hack. Is there a cleaner way of doing this?
I observe no flickering at all, but that might be because my computer is too fast or it might be an improvement in Windows 7 to reduce flickering.
I set the MDI child window position at its FormShow:
procedure TForm2.FormShow(Sender: TObject);
begin
Top := 200;
Left := 400;
end;