Class TScaleForm (unit Formpage)

Inherits from

TForm

Constructors


constructor Create(AOwner: TComponent);



Functions

procedure ChangeScale(M, D: Integer);

the owner will do the scaling for us

procedure WMSize(var message: TWMSize);


procedure AfterSIZE_MAXIMIZED(var message: TMessage);


procedure AfterSIZE_RESTORED(var message: TMessage);


procedure mymax(var m: TWMGETMINMAXINFO);

if (message.

procedure ScaleComponents(Reason, M, D: Integer);


Properties

property maxheight : word


property maxleft : word


property maxtop : word


property maxwidth : word


Events

Variables

ScaledBy : TScaledBy;


AllowResize : WordBool;


AllowScale : WordBool;


fmh : word;


fml : word;


fmt : word;


fmw : word;


nOldHeight : integer;


nOldWidth : integer;



Constructors


constructor Create(AOwner: TComponent);


Functions


procedure ChangeScale(M, D: Integer);

the owner will do the scaling for us


procedure WMSize(var message: TWMSize);


procedure AfterSIZE_MAXIMIZED(var message: TMessage);


procedure AfterSIZE_RESTORED(var message: TMessage);


procedure mymax(var m: TWMGETMINMAXINFO);

if (message.SizeType = SIZE_MAXIMIZED) then begin { Window has been maximized: } if (Width <> nOldWidth) then ScaleComponents(Width, nOldWidth); ScaledBy.M := Width; ScaledBy.D := nOldWidth; exit; end; if (message.SizeType = SIZE_RESTORED) then begin { Window has been resized: } if (ScaledBy.M <> 1) or (ScaledBy.D <> 1) then ScaleComponents(ScaledBy.D * 2, ScaledBy.M * 2); ScaledBy.M := 1; ScaledBy.D := 1; exit; end;


procedure ScaleComponents(Reason, M, D: Integer);


Properties


property maxheight : word


property maxleft : word


property maxtop : word


property maxwidth : word


Events


Variables


ScaledBy : TScaledBy;


AllowResize : WordBool;


AllowScale : WordBool;


fmh : word;


fml : word;


fmt : word;


fmw : word;


nOldHeight : integer;


nOldWidth : integer;