views:

1639

answers:

2

Hello!

I am working on a application for a Pocket PC that runs on Windows CE. I need to start another process, however I need it to start Hidden or Minimized. Doing that on full Windows framework is no problem, I just set

Process.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;

or

Process.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Minimized;

however StartInfo.WindowStyle does not exist on Windows CE. How do I accomplish this with what is available on Windows CE?

Edit: I do not have any information or even access to applications / processes that are run this way. I get the path and optional arguments in a ini file, so I can not change the applications that will be run.

A: 

Do you have control over the source of both applications? You could provide a command line parameter that has the semantic "start hidden" - the second program could read this and start as hidden.

1800 INFORMATION
Sorry I wasn't specific enough in my question, but no I don't have any information about the application that will be run. I only get the path to the application in a ini file.
Rekreativc
+3  A: 

Windows CE itself doesn't support the STARTUPINFO structure passed to CreateProcess in the native APIs, so there's no way that the CF could implement it. Your only option is to run it, then use FindWindow to find and hide/minimize it.

ctacke