title: MoveWindow API doesn't work well on Vista
body: <p>I have an application on Vista which loops through all processes and finds associated main windows in order to move and resize them. </p>
  
  <p>The problem is that some windows get moved and resized and some don't. Also it even seems that moved and resized windows aren't moved and resized according to the MoveWindow function call because they are resized to title bar and all of them are on the same line (same y coordinate).</p>
  
  <p>Here's the sample code:</p>
  
  <pre><code>IntPtr handle;
  Process[] processList = Process.GetProcesses();
  
  int i = 0;
  foreach (Process process in processList)
  {
       handle = process.MainWindowHandle;
  
       if (handle != IntPtr.Zero) //If the process has window then move and resize it.
       {
            bool moveResult = MoveWindow(handle, i * 50, i * 50, 500, 500, true);
            i++;
       }
  }
  </code></pre>
  
  <p>Is this because of Vista? What alternative should I use?</p>