hier ein code aus dem EDH2k:
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48:
| Function ChangeResolution(sizex,sizey,bpp:DWORD):Boolean; var DeviceMode:TDeviceModeA; i:Integer; Begin i:=0; Result:=False; while EnumDisplaySettings(nil,i,DeviceMode) do begin with DeviceMode do if (dmPelsWidth=sizex) and (dmPelsHeight=SizeY) and (dmBitsPerPel=bpp) then begin case ChangeDisplaySettings(DeviceMode, CDS_TEST) of DISP_CHANGE_SUCCESSFUL: Result:=True;
DISP_CHANGE_RESTART: Showmessage('You have to restart');
DISP_CHANGE_BADFLAGS: Showmessage('Bad display mode flags');
DISP_CHANGE_FAILED: Showmessage('Failed in changing resolution');
DISP_CHANGE_BADMODE: Showmessage('Display mode not supported');
DISP_CHANGE_NOTUPDATED: Showmessage('Registry could not be updated');
else Result:=true; end;
if Result then ChangeDisplaySettings(DeviceMode, CDS_FULLSCREEN) end; Inc(i); end; End; |
_________________
In the beginning was the word.
And the word was content-type: text/plain.