C# - Launch Invisible Process (CreateNoWindow & WindowStyle not working?)
        Posted  
        
            by Chad
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Chad
        
        
        
        Published on 2010-06-10T02:14:38Z
        Indexed on 
            2010/06/10
            2:22 UTC
        
        
        Read the original article
        Hit count: 775
        
I have 2 programs (.exe) which I've created in .NET. We'll call them the Master and the Worker. The Master starts 1 or more Workers. The Worker will not be interacted with by the user, but it is a WinForms app that receives commands and runs WinForms components based on the commands it receives from the Master.
I want the Worker app to run completely hidden (except showing up in the Task Manager of course). I thought that I could accomplish this with the StartInfo.CreateNoWindow and StartInfo.WindowStyle properties, but I still see the Client.exe window and components in the form. However, it doesn't show up in the taskbar.
   Process process = new Process
      {
          EnableRaisingEvents = true,
          StartInfo =
              {
                  CreateNoWindow = true,
                  WindowStyle = ProcessWindowStyle.Hidden
                  FileName = "Client.exe",
                  UseShellExecute = false,
                  ErrorDialog = false,
              }
      };
What do I need to do to let Client.exe run, but not show up?
© Stack Overflow or respective owner