I am trying to remove title-bar of a form while keeping the border to have a resizable form. I set the BorderStyle
to bsNone
and override the CreateParams
procedure:
procedure TMainForm.CreateParams(var Params: TCreateParams);
begin
inherited;
Params.Style := Params.Style or WS_BORDER or WS_THICKFRAME;
end;
The only issue I am facing is a white bar on top edge of the form (in win 10):
How can I get rid of this white bar?
bsNone
makes the window not resizable. Explore thebsToolWindow
andbsSizeToolWin
alternatives. Going down the WinAPI route can prove to be a lot of work. – DeathlessWM_NCPAINT
and possiblyWM_NCACTIVATE
messages, painting the border the same color as your client area bg? I haven't tried with Win 10 (and can't do so right now) – Painless