【发布时间】:2016-08-20 06:37:47
【问题描述】:
启动后如何隐藏或最小化进程窗口的窗口?
P.S RedirectStandardOutput 我需要。我尝试使用 WinAPI - ShowWindow(handle, SW_HIDE);
但它也没有用
Process process = new Process();
process.StartInfo.FileName = processName;
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.WindowStyle = ProcessWindowStyle.Minimized;
process.Start();
process.OutputDataReceived += OnDataReciever;
process.BeginOutputReadLine();
【问题讨论】:
-
进程 - 这是另一个控制台应用程序......
-
我需要一个访问权限来阅读窗口标题
-
我不是读心术。您的问题中没有任何内容涉及控制台的窗口标题。这也是一个令人惊讶的要求,因为它通常没有用处。