I believe SetBorderStyle (in Forms.pas) should have been coded as follows (bold = new line). This way it doesn't try to change AutoScroll while the component is loading.
procedure TCustomForm.SetBorderStyle(Value: TFormBorderStyle);
begin
if FBorderStyle <> Value then
begin
FBorderStyle := Value;
if not (csLoading in ComponentState) then
AutoScroll := FBorderStyle in [bsSizeable, bsSizeToolWin];
if not (csDesigning in ComponentState) then RecreateWnd;
end;
end;
If you don't want to modify the VCL source code, a workaround is to put an "AutoScroll := False" line in the form's OnCreate handler.
|