To create invisible MDI child forms, you set your Visible property to False and, in addition, you need to disable the VCL behavior that shows their strength at creation time. This is done using the FormStyle TCustomForm property installer, which sets Visible to True for MDI child forms.
If you set the FormStyle parameter in the object inspector, then a property identifier will already be created at the time the form is created, and the form will not be shown immediately, but only after the construction is completed. This allows you to reset the request to show the form by overriding the AfterConstruction() method as follows:
procedure TMDIChild.AfterConstruction; begin Exclude(FFormState, fsVisible); inherited; end;
This will create an invisible MDI child form.
To verify this, you can create a new MDI application in the IDE, override the method in the child form class, as shown above, and simulate a lengthy initialization:
procedure TMainForm.FileNew1Execute(Sender: TObject); var i: integer; begin for i := 1 to 10 do begin CreateMDIChild('NONAME' + IntToStr(MDIChildCount + 1)); Update; Sleep(500); end; for i := 0 to MDIChildCount - 1 do MDIChildren[i].Visible := True; end;
Without an overridden AfterConstruction() method, it will create and display child MDIs every half second. Using the overridden method, it will display them all after a busy period of 5 seconds, which will give you the opportunity to display your splash screen.
Important:
Using LockWindowUpdate() to reduce flickering or suppress the output of any screen is wrong, wrong, wrong. Don't do this ; read the Raymond Chen series of articles on this topic to understand why this is.