procedure TMainForm.FormCreate(Sender: TObject);
var
Setting: LongInt;
begin
if BorderStyle= bsNone then Exit;
Setting:= GetWindowLong(Handle, gwl_style);
if (Setting and ws_Caption)= ws_Caption then
begin
case BorderStyle of
bsSingle,
bsSizeable: SetWindowLong(Handle, gwl_Style, Setting and (Not(ws_Caption))or ws_border);
bsDialog: SetWindowLong(Handle, gwl_Style, Setting and (Not(ws_Caption))or ds_modalframe or ws_dlgframe);
end;
end;
Height:= Height- getSystemMetrics(sm_cyCaption);
Refresh;
end;
var
Setting: LongInt;
begin
if BorderStyle= bsNone then Exit;
Setting:= GetWindowLong(Handle, gwl_style);
if (Setting and ws_Caption)= ws_Caption then
begin
case BorderStyle of
bsSingle,
bsSizeable: SetWindowLong(Handle, gwl_Style, Setting and (Not(ws_Caption))or ws_border);
bsDialog: SetWindowLong(Handle, gwl_Style, Setting and (Not(ws_Caption))or ds_modalframe or ws_dlgframe);
end;
end;
Height:= Height- getSystemMetrics(sm_cyCaption);
Refresh;
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货