title: Possible to control other Programs/Windows
body: <p>I was wondering whether it is possible to resize programs other than the actual application itself. IE, I want to resize and move Word and my application to fill 70% and 30% of the screen respectively.</p>
  
  <pre><code>Private Sub MinimiseButton_Copy_Click(sender As Object, e As RoutedEventArgs) Handles MinimiseButton_Copy.Click
      Me.Left = SystemParameters.PrimaryScreenWidth - Me.Width + 14
      Me.Top = -14
      Me.Height = SystemParameters.PrimaryScreenHeight
  
      Dim parry As System.Diagnostics.Process() = System.Diagnostics.Process.GetProcessesByName("winword")
      Dim word As System.Diagnostics.Process = parry(0)
      SetWindowPos(word.Handle, 0, 0, 0, SystemParameters.PrimaryScreenWidth - Me.Width, SystemParameters.PrimaryScreenHeight - 28, &amp;H10)
  End Sub
  
  &lt;DllImport("user32.dll", CharSet:=CharSet.Auto)&gt; Public Shared Function SetWindowPos(hWnd As IntPtr, hWndInsertAfter As IntPtr, X As Integer, Y As Integer, W As Integer, H As Integer, uFlags As UInteger) As Boolean
  End Function
  </code></pre>