Monitor's working area coordinate {0,0} does not conform left-top corner of the window anymore in Windows 10.
In other words, calling SetWindowPos(hWnd, NULL, 0,0,0,0, SWP_NOSIZE) leaves a gap at the left.
The problem was reported in long ago in April 2015, when Windows 10 was not released yet to general public. Since that time, there was neither official answer from Microsoft, nor workaround recommendations.
And here are links:
- insider/forum/insider_wintp-insider_desktop/desktop-coordinate-system-is-broken
- ConEmu Issue 284
- Simple PowerShell script demonstrating the problem
- I belive, I reported the problem via feedback application, but I can't find this report now.
Requirements
- Windows 10 of course.
- Task bar panel location is bottom or right edge of screen. Script does not check working area coordinates.
[void][reflection.assembly]::LoadWithPartialName("System.Windows.Forms")
$form = New-Object System.Windows.Forms.Form
$form.Text = "Hello World"
$set_pos = { $form.Location = New-Object System.Drawing.Point(0, 0); }
$form.add_Load($set_pos)
[void]$form.ShowDialog()
Simple C++ project (you may download binary from releases) demostrates the problem in details. It takes into account active monitor working area and tries to move its window to the screen edges.
Just click the button, do you see the gap?
Well, lets move the window dragging its caption with mouse. Do you see negative coordinates in the caption?
Really? Negative coordinates of the normal (not maximized) window on the primary monitor?
Personally, I consider this breaking change in coordinate system logic is a bug. But it would be nice to recieve a feedback from Microsoft.
- Is it a confirmed bug?
- Is it a ‘feature’?
- Is there any workaround to put the window at the edge of the monitor working area?


