您可以查询HKCU\Control Panel\Desktop\Win8DpiScaling
此键和其他相关的关键点在DPI-related APIs and registry settings证明,但相关的文字如下:
控制面板\外观和个性化\显示用户 界面(UI)包括复选框:让我为我的所有显示选择一个缩放级别 ,该级别控制系统是否将单比例因子应用于所有显示器(如Windows®8和Windows的早期版本 )或不同的s采用 的制表因子计算每个显示器的像素密度(Windows 8.1默认值)。
此复选框在Windows 8.1中配置HKCU \ Control Panel \ Desktop \ Win8DpiScaling 注册表项。
Key value : 0 Meaning : Different scale factors for each display: Windows 8.1 default.Content that is moved from one display to another will be the right size, but can be bitmap-scaled.
Key value : 1 Meaning : Same scale factor is applied to all displays: Windows 8 and earlier Windows versions behavior.Content that is moved from one display to another might be the wrong size
完美,谢谢。我会测试 – mikew
呃,应该不是程序使用api调用而不是注册表?那是除非没有api。 –
@David:据我所知,没有API返回通过GUI选择的值。虽然您可以调用[GetScaleFactorForMonitor](https://msdn.microsoft.com/en-us/library/windows/desktop/dn302060.aspx)并比较这些值,但没有API会告诉您它们是否全部相同由于这个特定的GUI设置,或者因为它们被单独设置为相同的值。 – IInspectable