title: How do i use SetWindowPos to center a window?
body: <p>What I want to do is to bring the handle to the front and to the center of the screen. Bring it to the front I know how to do i'm using <code>SetForegroundWindow(IntPtr hWnd);</code> and it's working fine. But how do I use the SetWindowPos to force to be in the center of the screen ?</p>
  
  <pre><code>IntPtr handle = process.MainWindowHandle;
  if (handle != IntPtr.Zero)
  {
      SetWindowPos(handle, 0, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOSIZE | SWP_SHOWWINDOW);
  }
  </code></pre>
  
  <p>Then when I call in the constructor for example to SetWindowPos what should I give it ? handle is fine I know what it should be. But all the resr 0,0,0,0,0,0 and what should be the values fro SWP_NOZORDER and SWP_NOSIZE  ?</p>