如何更改计算机显示模式至256色(50分)

  • 主题发起人 主题发起人 fevath
  • 开始时间 开始时间
F

fevath

Unregistered / Unconfirmed
GUEST, unregistred user!
给出可用代码
 
给个提示也行呀
 
function SetColorDepth_xy(Depth,w,h:integer):boolean;<br>var<br>&nbsp; lpDevMode:TDeviceMode;<br>begin<br>&nbsp; Result:=EnumDisplaySettings(nil, 0, lpDevMode);<br>&nbsp; if Result then<br>&nbsp; begin<br>&nbsp; &nbsp; lpDevMode.dmFields := dm_PelsWidth or dm_PelsHeight or dm_BitsPerPel;<br>&nbsp; &nbsp; lpDevMode.dmBitsPerPel:=depth;<br>&nbsp; &nbsp; lpDevMode.dmPelsWidth:=w;<br>&nbsp; &nbsp; lpDevMode.dmPelsHeight:=h;<br>&nbsp; &nbsp; Result := ChangeDisplaySettings(lpDevMode, 0)=DISP_CHANGE_SUCCESSFUL;<br>&nbsp; end;<br>end;<br><br><br>procedure TForm1.Button1Click(Sender: TObject);<br>begin<br>SetColorDepth_xy(16,800,600);<br>end;<br>
 
后退
顶部