3

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!

tmighty
  • 10,734
  • 21
  • 104
  • 218
  • 2
    Had the same issue under different circumstances and it turned out on Windows 10 _(and above, I guess)_, it's not a bug, it's a feature, as explained in [this SO question](https://stackoverflow.com/questions/34139450/getwindowrect-returns-a-size-including-invisible-borders). – Hel O'Ween Feb 15 '22 at 15:09

0 Answers0