开发者

C# - Opening text file with notepad minimized?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜