凤
凤冠坡
Unregistered / Unconfirmed
GUEST, unregistred user!
function CurRate: integer;<br>var<br> DeviceMode: TDeviceMode;<br> I: integer;<br>begin //当前刷新率<br> EnumDisplaySettings(nil, Cardinal(-2), DeviceMode);<br> Result := DeviceMode.dmDisplayFrequency;<br>end;<br>-1: 表示优化,0:表示默认,其他就是自己设置的实际值 <br>该结果值直接作为ChangeDisplaySettings()<br>procedure SetCurRate;<br>var<br> DM: TDeviceMode;<br> I: Word;<br>begin<br> FillChar(DM, Sizeof(DM), 32);<br> ENumDisplaySettings(nil, 0, DM);<br> DM.dmFields := dm_pelsheight or dm_BitsPerPel or dm_DisplayFrequency;<br> DM.dmPelsWidth := 800;<br> DM.dmPelsHeight := 600;<br> DM.dmDisplayFrequency := DWord(CurRate);<br> if ChangeDisplaySettings(DM, 2) = 0 then ChangeDisplaySettings(DM, 1);<br>end;<br><br>的参数即可设置刷新率。