1

I need to hide a window that is generated using Process class.

I made this procedure

_process = new Process()
            {
                EnableRaisingEvents = true
            };
_process.StartInfo.UseShellExecute = false;
_process.StartInfo.RedirectStandardOutput = true;
_process.StartInfo.CreateNoWindow = true;
_process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
_process.StartInfo.FileName = "app.exe";

_process.Start();

I need to hide a window that is generated for this process. Probably a child window of it.

I need a way to hide all child windows that a process call can generate.

rareyesdev
  • 2,337
  • 1
  • 25
  • 43
chfumero
  • 1,137
  • 2
  • 13
  • 26
  • Possible duplicate : http://stackoverflow.com/questions/5377423/hide-console-window-from-process-start-c-sharp – quantdev May 28 '14 at 20:46
  • Okay, but you forgot to ask a question. – tnw May 28 '14 at 20:47
  • 2
    CreateNoWindow can only apply to console mode apps. ProcessWindowStyle.Hidden is routinely ignored by GUI apps since that creates a zombie that the user can only close with Task Manager. Contact the owner of the program for support. – Hans Passant May 28 '14 at 20:52
  • What can I do if I don't have suppport of the app? Any suggestions. – chfumero May 28 '14 at 20:54
  • 1
    @codeVillagerCU0 Alter your requirements to something that you're capable of accomplishing. – Servy May 28 '14 at 21:00
  • I find a way of do this using pinvoke and the functions of the winapi. I don't know if that is a good practice but works. – chfumero Jun 02 '14 at 13:39

0 Answers0