Remove MDI Child Title Bar
The BorderStyle property of a Delphi form lets you specify the appearance and behavior of the form border.
If you need to hide the title bar of a Multiple Document Interface child form, you might be tempted to set the BorderStyle to bsNone - and make the form not resizable with no visible border line.
However, for an MDI child form, setting the BorderStyle property to bsNone does NOT remove the title bar.
The only way to remove (hide) the border of an MDI child form is by messing with the CreateParams procedure:
Note that removing the caption bar means the user will have a difficult time moving, sizing and closing the child.
Delphi tips navigator:
» How to Select a Control Parent in the Delphi Form Designer
« Adding Custom Properties to Delphi Forms; Overriding the Create Constructor
If you need to hide the title bar of a Multiple Document Interface child form, you might be tempted to set the BorderStyle to bsNone - and make the form not resizable with no visible border line.
However, for an MDI child form, setting the BorderStyle property to bsNone does NOT remove the title bar.
The only way to remove (hide) the border of an MDI child form is by messing with the CreateParams procedure:
procedure TMDIChild.CreateParams(var Params: TCreateParams) ; begininherited; Params.style := Params.style and not WS_CAPTION; end;
Note that removing the caption bar means the user will have a difficult time moving, sizing and closing the child.
Delphi tips navigator:
» How to Select a Control Parent in the Delphi Form Designer
« Adding Custom Properties to Delphi Forms; Overriding the Create Constructor
Source...