type
TfrmJtBaseScale = class(TfrmJtBase)
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
TMyControl = class(TControl);
implementation
{$R *.dfm}
procedure TfrmJtBaseScale.FormCreate(Sender: TObject);
var
i: integer;
a: real;
begin
if Screen.Width <> DefaultWidth then
begin
height:=longint(height)*longint(screen.height) div DefaultHeight;
width:=longint(width)*longint(screen.width) div DefaultWidth;
scaleby(screen.width , DefaultWidth);
for i := 0 to self.ControlCount -1 do
begin
a := screen.Height / DefaultHeight * TMyControl(self.Controls[i]).Font.Size;
TMyControl(self.Controls[i]).Font.Size := trunc(a);
end;
end;
end;