C# - 用记事本最小化打开文本文件?

时间:2011-06-06 20:01:11

标签: c# process minimize notepad

最小化样式看起来不会产生影响:

string logFilePath = @"c:\mylog.log";
ProcessStartInfo startInfo = new ProcessStartInfo(logFilePath) {WindowStyle = ProcessWindowStyle.Minimized};
Process.Start(startInfo);

感谢。

1 个答案:

答案 0 :(得分:1)

Community Comments section的MSDN页面的WindowStyle Property说:

  

要使用隐藏,您需要使用UseShellExecute = true

     

要使用隐藏,您需要使用UseShellExecute = true等。这些要求应在文档中注明,但不是。

你试过吗?也许它也适用于最小化。

相关问题