继承你的Mainform的AlignControls方法: procedure TMainForm.AlignControls(AControl: TControl; var Rect: TRect); begin inherited; if HandleAllocated then SetWindowLong(Handle, GWL_STYLE, GetWindowLong(Handle, GWL_STYLE) and not (WS_HSCROLL or WS_VSCROLL)); end;
procedure TMainForm.AlignControls(AControl: TControl; var Rect: TRect);
begin
inherited;
if HandleAllocated then
SetWindowLong(Handle, GWL_STYLE, GetWindowLong(Handle, GWL_STYLE) and not (WS_HSCROLL or WS_VSCROLL));
end;