[英]How to set “Override high DPI scaling” to “Application” programmatically through code
We have a control inside a activex control that suffers from graphical artifacts on Windows 10. It works fine in Windows 7. The only way we have been able to fix the artifacts is by changing the exe setting pictured below.我们在 Activex 控件中有一个控件,该控件在 Windows 10 上存在图形伪影。它在 Windows 7 中运行良好。我们能够修复伪影的唯一方法是更改下图所示的 exe 设置。
Is there a way to change it through code (Visual Studio 2017 c#)?有没有办法通过代码(Visual Studio 2017 c#)来改变它? In our project we dont have a manifest file in project.在我们的项目中,我们的项目中没有清单文件。
I was able to get through using the below script and save as bat file and execute it in the code to set DPI scaling我能够通过使用下面的脚本并保存为 bat 文件并在代码中执行它来设置 DPI 缩放
@echo off title This is to set HIGHDPI Scaling @echo off title 这是设置HIGHDPI缩放
REG ADD "HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /V "C:\Program Files (x86)\VidSys\VidSys Out-of-Process Viewer Framework\External Process\NvrViewerExternalProcess.exe" /T REG_SZ /D ~HIGHDPIAWARE /F REG ADD "HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /V "C:\Program Files (x86)\VidSys\VidSys 进程外查看器框架\外部进程\NvrViewerExternalProcess.exe" /T REG_SZ /D ~HIGHDPIAWARE /F
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.