Recent

Author Topic: Screenshot multi monitor  (Read 910 times)

xinyiman

  • Hero Member
  • *****
  • Posts: 2256
    • Lazarus and Free Pascal italian community
Screenshot multi monitor
« on: April 21, 2023, 12:55:00 pm »
Hi, searching the forum a bit, I tried to implement a screenshot of one of the monitors of the PC on which the program runs.

I attach example that doesn't work as it should. The screen of monitor 0 works well, from the second onwards I'm doing something wrong.

Who can help me? A thousand thanks
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

DragoRosso

  • New Member
  • *
  • Posts: 13
Re: Screenshot multi monitor
« Reply #1 on: April 21, 2023, 02:21:58 pm »
You are in trouble with different DPI and the resizing of the monitors.

If the monitors are differents DPI and / or different resizing, you must calculate the real dimension (may be quote X and / or Y) of the corners.

I never tried to catch a single part of a monitor, but for sure this should be the problem.

Bye

DragoRosso

  • New Member
  • *
  • Posts: 13
Re: Screenshot multi monitor
« Reply #2 on: April 21, 2023, 02:31:59 pm »
Instead to calculate "by code", sets the property in the projects option DPI AWARE PER MONITOR V2

Bye

xinyiman

  • Hero Member
  • *****
  • Posts: 2256
    • Lazarus and Free Pascal italian community
Re: Screenshot multi monitor
« Reply #3 on: April 21, 2023, 02:54:28 pm »
Thanks
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

 

TinyPortal © 2005-2018