Attached is a test desktop capture program. Gets an area based on the cursor position — the cursor points to the upper left corner, and the area is the size of the program window. No matter how many screens there are and where the cursor is — it always copies a visible part of the desktop. If the screens have different resolutions, the empty space is filled by the system with black color. However, the content outside the screens is not cleared by the system, so in the program I first fill the entire bitmap in white, and then the visible desktop fragment is copied.
In the attached picture you can see all three places — the main monitor (LCD0), an additional monitor (LCD1) and the empty space filled in black, resulting from the difference in resolution of both screens. In the second attachment is a Lazarus project of this program. Tested on Windows10. Have fun.