我得到100和150的相同dpi值? c#Windows 8操作系统上的Windows应用程序 [英] I m getting same dpi value for 100 and 150? c# Windows appication on Windows 8 OS
问题描述
HI,
我如何找到设置为100或150时的显示设置之间的差异
我想显示如果用户将显示设置设置为150(更大 - 150%),则显示消息。
提前感谢
< blockquote>
根据 http: //technet.microsoft.com/en-us/library/dn528846.aspx [ ^ ]
除非调用它的工具注册为DPI感知,否则此API将始终返回96.
您应该将您的应用程序标记为支持DPI。
您有2个选项可以这样做:
1.
将此xml添加到您的清单文件中:
< asmv3:application xmlns:asmv3 = #unknown >
< asmv3:windowssettings xmlns = http://schemas.microsoft.com/SMI/2005/WindowsSettings >
< dpiaware > 每个监视器< / dpiaware >
< / asmv3 :windowssettings >
< / asmv3:application >
2.
在您的应用程序上调用`SetProcessDPIAware`函数。
信息: http://msdn.microsoft.com/en- us / library / windows / desktop / ms633543%28v = vs.85%29.aspx [ ^ ]
希望它有所帮助...
:)
HI,
How am I to find the difference between display setting when it set to 100 or 150
I want to show message if user set the display setting to 150(Larger-150%).
Thanks in advance
Hi,
According to http://technet.microsoft.com/en-us/library/dn528846.aspx[^]
This API will always return 96 unless the tool that calls it is registered as DPI-aware.
You should mark your application DPI-aware.
you have 2 options to do so:
1.
add this xml to to your manifest file:
<asmv3:application xmlns:asmv3="#unknown"> <asmv3:windowssettings xmlns=""http://schemas.microsoft.com/SMI/2005/WindowsSettings""> <dpiaware>Per monitor</dpiaware> </asmv3:windowssettings> </asmv3:application>
2.
call `SetProcessDPIAware` function on your application.
information: http://msdn.microsoft.com/en-us/library/windows/desktop/ms633543%28v=vs.85%29.aspx[^]
hope it help...
:)
这篇关于我得到100和150的相同dpi值? c#Windows 8操作系统上的Windows应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!