开发者

C# - Opening text file with notepad minimized?

开发者 https://www.devze.com 2023-03-11 16:14 出处:网络
It doesn\'t look like the Minimized style has an effect: string logFilePath = @\"c:\\mylog.log\"; ProcessStartInfo startInfo = new ProcessStartInfo(logFilePath) {WindowStyle = ProcessWindowStyle.Mini

It doesn't look like the Minimized style has an effect:

string logFilePath = @"c:\mylog.log";
ProcessStartInfo startInfo = new ProcessStartInfo(logFilePath) {WindowStyle = ProcessWindowStyle.Minimized};
Process.Star开发者_如何学Got(startInfo);

Thanks.


The Community Comments section of the MSDN page for the WindowStyle Property says:

To use Hidden, you'll need UseShellExecute = true

To use Hidden, you'll need UseShellExecute = true among other things. These requirements should be noted in the documentation, but aren't.

Have you tried that? Maybe it applies to Minimized as well.

0

精彩评论

暂无评论...
验证码 换一张
取 消