1. Home
  2. Computing & Technology
  3. Delphi Programming

Remove MDI Child Title Bar

By , About.com Guide

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:

procedure TMDIChild.CreateParams(var Params: TCreateParams) ;
begin
  inherited;
  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

More Delphi Programming Quick Tips
Explore Delphi Programming
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Delphi Programming
  4. Coding Delphi Applications
  5. Delphi Tips and Tricks
  6. Delphi 2007 Tips
  7. Remove Delphi's MDI Child Form Title Bar

©2009 About.com, a part of The New York Times Company.

All rights reserved.