Window still visible

P

Peter Morris

private void ExecuteCalculationEngine()
{
string executionPath = Path.GetDirectoryName(InputFileName);
Directory.SetCurrentDirectory(executionPath);
var startInfo = new ProcessStartInfo(Path.Combine(executionPath,
"xxxxxxxxx.exe"));
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
startInfo.CreateNoWindow = true;
startInfo.WorkingDirectory = executionPath;
Process.Start(startInfo).WaitForExit();
}

Can anyone tell me why the window still appears?


Thanks

Pete
 
F

Family Tree Mike

Did you write the executable being launched (xxxxxxx.exe)? If not, and it
is a windows forms app, then perhaps the developer makes the form visible on
startup. This worked for me from a forms app launching a forms app that I
wrote, and did not forcibly make visible.

Why did you declare startinfo as a var?
 
P

Peter Morris

Hi Mike
Did you write the executable being launched (xxxxxxx.exe)?

No, I didn't.
If not, and it is a windows forms app, then perhaps the developer makes
the form visible on startup.

That is very possible. Does anyone know how I can iterate forms owned by a
process and then hide them?

Why did you declare startinfo as a var?

I suspect this is a path of discussion I don't have time for :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top