I tried to use MoveWindow and SetWIndowPos API
```
[DllImport("user32.dll", SetLastError = true)]
public static extern bool MoveWindow(IntPtr hWnd, int X, int Y, int nWidth, int nHeight, bool bRepaint);
[DllImport("user32.dll", EntryPoint = "SetWindowPos")]
public static extern IntPtr SetWindowPos(IntPtr hWnd, int hWndInsertAfter, int x, int Y, int cx, int cy, int wFlags);
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
public static extern IntPtr GetForegroundWindow();
[DllImport("user32.dll")]
public static extern bool GetWindowRect(IntPtr hwnd, ref Rect rectangle);
```
to set the window left one third, middle one third and right one third, however, it seems that the window still has some pixels on its left for my monitor. It is not exact (0,0) positon. I tried both SetWIndowPos and MoveWindow, they are the same. My monitor is Dell U3219Q 31.5 4K. Also I tried to use width / 3 as the width, but as you can see, there are still padding among them. What is the problem with MoveWindow and SetWIndowPos API?
][2]
][3]
[2]: /answers/storage/attachments/125044-image.png