System.diagnostics.processwindowstyle.minimized在Windows 7中不起作用 [英] System.diagnostics.processwindowstyle.minimized is not working in windows 7
问题描述
我正在开发一个Windows应用程序,我正在调用一个进程,但我不希望在前台显示进程窗口所以我我正在使用
System.Diagnostics.ProcessWindowStyle.Minimized但它在Windows 7中不起作用
我尝试过:
i试用以下
StartInfo.WindowStyle = ProcessWindowStyle.Minimize;
StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
StartInfo.UseShellExecute = false;
Hi,
I am developing one windows application,within that i am calling one process,but i don't want show that process window in foreground so i am using
System.Diagnostics.ProcessWindowStyle.Minimized but it is not working in windows 7
What I have tried:
i tried following
StartInfo.WindowStyle = ProcessWindowStyle.Minimize;
StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
StartInfo.UseShellExecute = false;
推荐答案
我相信UseShellExecute必须为true让WindowStyle工作。
忽略 ProcessWindowStyle Enumeration(System.Diagnostics) [ ^ ]说的恰恰相反!
也可以写一个应用程序以这种方式忽略来自shell的样式请求。
Alan。
I believe that UseShellExecute must be true to get the WindowStyle to work.
Ignore the MS documentation at ProcessWindowStyle Enumeration (System.Diagnostics)[^] which says the exact opposite!
It is also possible for an application to be written in such a way that it ignores a style request from the shell.
Alan.
这篇关于System.diagnostics.processwindowstyle.minimized在Windows 7中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!