Prvo pokupi staru rezoluciju:
OldWidth := GetSystemMetrics(SM_CXSCREEN);
OldHeight := GetSystemMetrics(SM_CYSCREEN);
Pa pozovi:
SetScreenResolution(800, 600); // ili koja ti treba
Znaci rezoluciju vracas sa:
SetScreenResolution(OldWidth, OldHeight);
Funkcija koju treba da dodas:
function SetScreenResolution(Width, Height: integer): Longint;
var
DeviceMode: TDeviceMode;
begin
with DeviceMode do
begin
dmSize := SizeOf(TDeviceMode);
dmPelsWidth := Width;
dmPelsHeight := Height;
dmFields := DM_PELSWIDTH or DM_PELSHEIGHT;
end;
Result := ChangeDisplaySettings(DeviceMode, CDS_UPDATEREGISTRY);
end;
P.S. OldWidth i OldHeight su INTEGER.