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.
精彩评论