procedure TForm1.FormCreate(Sender: TObject);
begin
//最大限制
Constraints.MaxHeight := 400;
Constraints.MaxWidth := 400;
//最小限制
Constraints.MinHeight := 200;
Constraints.MinWidth := 200;
end;
或直接修改窗体的这个属性也可以。
procedure TForm1.FormResize(Sender: TObject);
begin
if Self.Width > 420 then Self.Width := 420;
if Self.Height > 240 then Self.Height := 240;
end;