求解C#中用process.start启动进程,隐藏窗体失败
我的源代码如下:
ProcessStartInfo info = new ProcessStartInfo();
info.FileName = @"d:\123.exe";
info.WindowStyle = ProcessWindowStyle.Hidden;
Process.Start(info);
现在的问题是:如果info.FileName = @"d:\123.exe";则打开的123.exe的窗体还是可见的。
但是如果是info.FileName = @"d:\hello.txt";则hello.txt的窗体是不可见的,
为什么会有这样的差异呢?如何让123.exe的窗体也不可见呢,望高手指教~!谢谢~!
另外VC++中可以用findwindow和findwindowEx查找窗体和控件,C#除了调用DLL中的以上API外,还有没有其他方式也能达到相同的目的呢,小弟初学者向各位请教~!谢谢~!