procedure TForm1.FormCreate(Sender: TObject);
var
devmode:tDevicemode;
begin
if screen.width<>orignwidth then
begin
if EnumDisplaySettings(nil,0,devmode) then
begin
devmode.dmfields:=dm_pelswidth OR dm_pelsheight ;
devmode.dmpelswidth:=orignwidth; {宽度}
devmode.dmpelsheight:=orignheight;{高度}
ChangeDisplaySettings(devmode,0); {更改设置}
end;
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
scaled:=true;
if (screen.width<>orignwidth) then
begin
height:=longint(height)*longint(screen.height) div orignheight;
width:=longint(width)*longint(screen.width) div orignwidth;
scaleby(screen.width , orignwidth);
end;
end;