好久没写博客了,这样不好,还是得把习惯培养起来。
问题与原因
用win10自带的远程桌面去连接VM,会遇到有些软件(例如vs2015)显示模糊的问题。
这是由于当windows去打开这个软件时,会去查询该软件是否是高DPI的,而对于那些高DPI的软件都会产生字体模糊等问题。
解决方法
修改软件配置参数,使其不使用高DPI即可。
Step1 修改注册表,使windows优先使用自定义配置
- 使用
Win+R
,并输入regedit
打开注册表 - 进入
KEY_LOCAL_MACHINE > SOFTWARE > Microsoft > Windows > CurrentVersion > SideBySide
- 右键添加
DWORD(32-bit) Value
- 将新加入的参数命名改为
PreferExternalManifest
,并求修改其值为1
,类型为Decimal
,并保存推出
Step2 创建自定义的配置文件
我们以vs2015为例
- 下载配置文件
在这里下载配置文件(我会在文章最后附上完整的配置文件内容,并不需要下载)。 - 找到程序可执行文件的运行位置
如vs2015在C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE
目录中,可执行文件名为devenv.exe
- 添加配置文件
将配置文件置于上步的目录中,并将名字修改为 执行文件.exe+.manifest,如vs2015的配置文件名为devenv.exe.manifest
Step3 重新打开软件
重新打开软件即可看到程序已经不再模糊了。
配置文件 manifest
懒的同学可去step2中的链接下载配置文件,但需要1个积分(并不是我想,是CSDN最少要一个)
<?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>
参考资料
[1] Adobe App Scaling on High DPI Displays (FIX)
[2] Font is blurry due to Visual Studio not supporting mixed mode dpi / multi-display DPI awareness / changing DPI scaling without logging out