if screen.width<>800 then<br> begin<br> j:=0;<br> while devmode.dmpelswidth<>800 do<br> begin<br> EnumDisplaySettings(nil,j,devmode);<br> j:=j+1;<br> end;<br> EnumDisplaySettings(nil,j-1,devmode);<br>// devmode.dmpelswidth:=800; {宽度}<br>// devmode.dmpelsheight:=600;{高度}<br> ChangeDisplaySettings(devmode,0); {更改设置}<br> devmode.dmfields:=dm_pelswidth OR dm_pelsheight ;<br> ChangeDisplaySettings(devmode,0); {更改设置}<br> end;<br>