title: How to open process within Windows form
body: <p>I would like to open process in within my windows form application.</p>
  
  <p>For example I would like when a user press on button in one of the windows form container the mstsc.exe will open.</p>
  
  <p>And if he will press on the button it will open IE on another container,</p>
  
  <pre><code>[DllImport("user32.dll", SetLastError = true)]
          static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent);
         private void button1_Click(object sender, EventArgs e)
      {
          Process p = Process.Start("mstsc.exe", @"c:\VPN4.rdp");
          Thread.Sleep(3000);
          p.StartInfo.CreateNoWindow = true;    // new
          SetParent(p.MainWindowHandle, this.panel1.Handle);
          p.StartInfo.WindowStyle = ProcessWindowStyle.Maximized;   //new
  
      }
  </code></pre>
  
  <p>It open the process but not in the windows form ,,,</p>