{on form create procedure}
{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;
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;
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;
procedure TForm3.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;