void Main() { var notepad = Process.GetProcessesByName("notepad").Single(); var rect = new Rect(); GetWindowRect(notepad.MainWindowHandle, ref rect); MoveWindow(notepad.MainWindowHandle, 200, 200, rect.Right - rect.Left, rect.Bottom - rect.Top, true); } internal struct Rect { public int Left; public int Top; public int Right; public int Bottom; } [DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall, ExactSpelling = true, SetLastError = true)] internal static extern bool GetWindowRect(IntPtr handle, ref Rect rect); [DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall, ExactSpelling = true, SetLastError = true)] internal static extern void MoveWindow(IntPtr handle, int x, int y, int width, int height, bool repaint);