10后台进程以1024x633运行

10后台进程以1024x633运行

本文介绍了Windows 10后台进程以1024x633运行,但我想将分辨率更改为1920x1080的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


有没有办法在Windows 10上更改后台进程的分辨率?我已经阅读了几篇提及更改DefaultSettings.XResolution注册表的在线文章,但这似乎不起作用。我知道后台进程分辨率
目前是1024x633,来自我在后台进程中截取的截图。后台进程是一个vstest.console.exe,它使用nunit适配器并使用selenium / chromedriver运行。

Is there a way to change the resolution of a background process on Windows 10? I've read several online articles mentioning changing the registry for the DefaultSettings.XResolution, but that does not appear to work. I know the background process resolution is currently 1024x633 from the screenshots I am taking on the background process. The background process is a vstest.console.exe which is running using the nunit adapter and using selenium/chromedriver.



我从C#.NET程序调用后台进程。以下是启动流程的代码:

I am calling the background process from a C# .NET program. Here is the code for starting the process:


ProcessStartInfo startInfo = new ProcessStartInfo()
{
    WindowStyle = ProcessWindowStyle.Hidden,
    FileName = fileInfo.FullName,
    CreateNoWindow = true,
    ErrorDialog = false,
    UseShellExecute = false,
    WorkingDirectory = currentTest.WorkingDirectory,
    RedirectStandardError = true,
    RedirectStandardOutput = true,
    Arguments = $"{Path.Combine(currentTest.WorkingDirectory, currentTest.TestFiles)} {currentTest.Options}"
};

process = new Process()
{
    EnableRaisingEvents = true,
    StartInfo = startInfo
};

process.OutputDataReceived += new DataReceivedEventHandler(OutputHandler);
process.ErrorDataReceived += new DataReceivedEventHandler(ErrorOutputHandler);
process.Start();
process.BeginErrorReadLine();
process.BeginOutputReadLine();
process.WaitForExit(600000);

推荐答案

感谢您在此发帖。

我很困惑为什么你需要设置后台进程的分辨率。它没有意义,因为后台进程不能有UI。

I am confused why you need to set the resolution of background process. it is meaningless, since the background process cannot have UI.

如果你想设置应用程序的DPI。请确认windows支持1920x1080。右键单击桌面然后选择Display

If you want to set the DPI for application. please confirm that the windows supports the 1920x1080. Right click the desktop then choose Display

设置,高级显示设置。

根据我的理解,分辨率是图片或UI。如果你想改变图片的DPI,你可以使用

方法SetResolution

According to my understand, the resolution is picture or UI. If you want to change the DPI of picture, you could use themethod SetResolution.

最诚挚的问候,

Hart


这篇关于Windows 10后台进程以1024x633运行,但我想将分辨率更改为1920x1080的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 17:05