How can I make my form resize more smoothly?

zz1433 picture zz1433 · Sep 21, 2009 · Viewed 11.6k times · Source

When resizing a form with many controls, the form looks bad because of flickering. What are some tips to have a smoother form resizing?

Answer

A. Vrbic picture A. Vrbic · Sep 21, 2009
procedure TForm1.WMEnterSizeMove(var Message:TWMMove);
begin
  Self.DisableAlign;
end;

procedure TForm1.WMExitSizeMove(var Message:TWMMove);
begin
  Self.EnableAlign;
end;