答案1
是的,垂直刷新率是对应的,但需要四舍五入,因为dmDisplayFrequency
值被读为无符号整数。以下 AHK 脚本显示四舍五入的值:
Enabled := ComObjError(1)
wmi := ComObjGet("winmgmts:{impersonationLevel=impersonate}!\\" A_ComputerName "\root\wmi")
for monitor in wmi.ExecQuery("SELECT NumOfMonitorSourceModes, MonitorSourceModes FROM WmiMonitorListedSupportedSourceModes WHERE Active=TRUE",,wbemFlagForwardOnly := 32)
{
Loop, % monitor.NumOfMonitorSourceModes - 1
modes .= "`n" . monitor.MonitorSourceModes[A_Index - 1].HorizontalActivePixels . " " . monitor.MonitorSourceModes[A_Index - 1].VerticalActivePixels . " Horz refresh: " . Round(monitor.MonitorSourceModes[A_Index - 1].HorizontalRefreshRateNumerator/monitor.MonitorSourceModes[A_Index - 1].HorizontalRefreshRateDenominator) . " Vert refresh: " . Round(monitor.MonitorSourceModes[A_Index - 1].VerticalRefreshRateNumerator/monitor.MonitorSourceModes[A_Index - 1].VerticalRefreshRateDenominator)
msgbox % monitor.InstanceName . "`n" . modes
}
重复的值集归因于隔行扫描或甚至可能是平移。对于此设置中连接的旧显示器和电视,水平速率要大得多,它们是否有特殊含义?在这里的一两种情况下,分子和相应的分母再次大得多,但再次产生 10 5
量级的结果。