procedure HideTitlebar;
var
save : LongInt;
begin
if BorderStyle = bsNone then Exit;
Save := GetWindowLong(Handle,gwl_Style);
if (Save and ws_Caption)=ws_Caption then Begin
Case BorderStyle of
bsSingle,
bsSizeable : SetWindowLong(Handle,gwl_Style,Save and (Not(ws_Caption)) or ws_border);
bsDialog : SetWindowLong(Handle,gwl_Style,Save and (Not(ws_Caption)) or ds_modalframe or ws_dlgframe);
end;
Height := Height-getSystemMetrics(sm_cyCaption);
Refresh;
end;
end;