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:
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中隐藏MDI子窗体的标题栏。通过设置BorderStyle属性无法实现此目的,需要通过修改CreateParams过程来移除标题栏。文中提供了一个具体的实现示例。
2836

被折叠的 条评论
为什么被折叠?



