Why does a window show a gap on the left side after MoveWindow(0, 0)

Viewed 83

I have multiple monitors.

I use MoveWindow to place a window on the top left corner:

Call MoveWindow(GetForegroundWindow(), 0, 0, somewidth, someheight, CInt(True))

It appears like that:

enter image description here

One can clearly see the gap on the left side.

To test what's going on, I move the window manually to the top left corner and call GetWindowRect.

Now it says that the window's Left is -8.

enter image description here

At first I thought that my screen was perhaps shifted, but all windows appear perfectly in that monitor and without any gap if maximized.

What might be going on here?

Thank you!

0 Answers
Related