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

标签 c# process minimize notepad

Minimized样式好像没有效果:

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

谢谢。

最佳答案

Community Comments section WindowStyle Property 的 MSDN 页面说:

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.

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

关于C# - 使用最小化的记事本打开文本文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6257362/

相关文章:

c# 使用 EPPLUS 使工作表名称只读?

c# - EPPlus 和图形

c# - 在 LINQ 查询期间获取行中的最小值

c - fork 程序输出

c++ - 程序最小化时位图消失

javascript - 根据 DropDownList 的值和模型调用 Action 方法

process - 使用 vbscript 进行进程间通信

caching - D 状态中的用户进程导致使用 Linux 2.6.24 和 ARM 处理器的看门狗重置

Android - 应用程序最小化处理

python - 为什么 "scipy.optimize.minimize"给我这么不合适?