动态修改分辨率:
function Resolution(X,Y:word):boolean;
var
DevMode:TDeviceMode;
begin
Result:=EnumDisplaySettings(nil,0,DevMode);
if Result then
begin
DevMode.dmFields:=DM_PELSWIDTH Or DM_PELSHEIGHT;
DevMode.dmPelsWidth:=X;
DevMode.dmPelsHeight:=Y;
Result:=ChangeDisplaySettings(DevMode,0)=DISP_CHANGE_SUCCESSFUL;
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Resolution(800,600);
end;
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Resolution(1280,1024);
end;