4k 显示器的问题在于,很多老程序不是为它们设计的,而且无法扩展。这导致窗口很小,这对于老游戏来说尤其糟糕。
我最近在网上找到一篇文章,解释了如何强制程序扩展,具体方法是在注册表中设置“PreferExternalManifest”,然后将以下内容粘贴到“EXEname.manifest”中:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly
xmlns="urn:schemas-microsoft-com:asm.v1"
manifestVersion="1.0"
xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0" processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*">
</assemblyIdentity>
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.VC90.CRT"
version="9.0.21022.8"
processorArchitecture="amd64"
publicKeyToken="1fc8b3b9a1e18e3b">
</assemblyIdentity>
</dependentAssembly>
</dependency>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="asInvoker"
uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
<asmv3:application>
<asmv3:windowsSettings
xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
<ms_windowsSettings:dpiAware
xmlns:ms_windowsSettings="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
false
</ms_windowsSettings:dpiAware>
</asmv3:windowsSettings>
</asmv3:application>
</assembly>
我想知道这到底是如何工作的,以及是否有可能强制窗口扩大到更大的尺寸(这是一个真的老游戏 :p)
答案1
启用设置后PreferExternalManifest
,exe 中包含的清单文件将被忽略。现在使用自创清单。这里这一行
<ms_windowsSettings:dpiAware
xmlns:ms_windowsSettings="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
false
</ms_windowsSettings:dpiAware>
告诉 Windows 该程序不具备 DPI 感知能力并且 Windows 将应用 DPI 虚拟化(模糊位图缩放)。
更简单的方法是启用注册表设置
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\PROGRAMNAME.exe]
"dpiAwareness"=dword:00000000
对于您想要“修复”的每个程序。