在没有注销的情况下更改DPI [英] change DPI without logoff

查看:246
本文介绍了在没有注销的情况下更改DPI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到在https: //technet.microsoft.com/en-us/library/dn528848.aspx,从Windows 8.1中提到的是DPI更改免费注销,
我还在Windows 10上尝试了App Remote Desktop Preview并发现它确实是注销免费用于Windows 8.1和Windows 10,但我没有找到任何关于如何在我的代码中实现此功能的参考或API。




有没有人知道相应的参考或API?



顺便说一句,我注意到https://autohotkey.com/boards/viewtopic.php?t=34701上有一个参考文献,它通过在HKCU \下修改注册表项
来提及控制面板\Desktop \ PerMonitorSettings \%MonitorID%并调用函数ChangeDisplaySettingsA可以在不注销Windows 10的情况下实现更改DPI,但如何在代码中获取正确的%MonitorID%是一个问题。

解决方案


感谢您在此发帖。


也许您可以尝试使用SetProcessDPIAware函数,SetProcessDPIAware可用于要求部分中指定的操作系统。


如果您使用SetProcessDPIAware方法,则需要使用  ;清单文件。


应将dpiAware指定为应用程序(.exe)清单的一部分。(嵌入式DLL清单中定义的dpiAware没有任何影响。)  ;      


以下标记显示如何将dpiAware设置为应用程序(.exe)清单的一部分。

< assembly xmlns = "瓮:架构 - 微软-COM:asm.v1" manifestVersion = QUOT; 1.0"的xmlns:asmv3 = QUOT;瓮:架构 - 微软-COM:asm.v3" > 
...
< asmv3:application>
< asmv3:windowsSettings xmlns =" http://schemas.microsoft.com/SMI/2005/WindowsSettings">
< dpiAware> true< / dpiAware>
< / asmv3:windowsSettings>
< / asmv3:application>
...
< / assembly>

有关应用程序清单的详细信息,请参阅
Manifests(并排组件)


   关于Windows 8.1上与DPI相关的API和注册表设置。您可以参考该文档,它提供了一个相关的方法来获取
注册表值。


   这是
相关解决方案
,你可以参考它。



最好的问候,


Hart



I notice that at https://technet.microsoft.com/en-us/library/dn528848.aspx, which mentioned from windows 8.1 is logoff free for DPI change, I also tried the App Remote Desktop Preview on windows 10 and found it's indeed logoff free for windows 8.1 and windows 10, but I did not found any reference or APIs about how to implement this function in my code.

Does anyone know about the corresponding reference or the APIs?

By the way, I noticed there a reference at https://autohotkey.com/boards/viewtopic.php?t=34701, which mentioned by chaning the registry key under HKCU\Control Panel\Desktop\PerMonitorSettings\%MonitorID% and call the function ChangeDisplaySettingsA can achieve changing the DPI without logoff on windows 10, but how to get the correct %MonitorID% in the code is a problem.

解决方案

Hi,

Thank you for posting here.

Maybe you can try the SetProcessDPIAware function, SetProcessDPIAware is available for use in the operating systems specified in the Requirements section.

If you use the SetProcessDPIAware method, you need to use manifest file.

dpiAware should be specified as part of the application (.exe) manifest.  (dpiAware defined in an embedded DLL manifest has no affect.)       

The following markup shows how to set dpiAware as part of an application (.exe) manifest.

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" >
 ...
  <asmv3:application>
    <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
      <dpiAware>true</dpiAware>
    </asmv3:windowsSettings>
  </asmv3:application>
 ...
</assembly>

For more information about application manifests, see Manifests (Side-by-Side Assemblies).

    About DPI-related APIs and registry settings on windows 8.1. you can reference the document, it provide a relevant method to get the registry value.

    Here is relevant solution, you can reference it.

Best Regards,

Hart


这篇关于在没有注销的情况下更改DPI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆