What needs to be done to solve the problem? Without changing the screen resolution, of course.
Best regards,
6 L A T E S T R E P L I E S (Newest First)
xequte
Posted - Aug 29 2023 : 19:21:05 Hi
The problem is that we're not doing any special calculations, we're just using Screen.Monitor values. You have disabled an option that is recommended for modern applications (in newer Delphi it should be "Per Monitor v2"), so to support it, we would need to determine that High DPI is turned off and then add the high DPI code ourselves (not just in this method, but in the many other methods of ImageEn that assume high DPI support is enabled). In effect, we'd be making ImageEn High DPI aware even though your manifest specifies that it should not be.
You would be better to enable high DPI and correct any old components that do not support it.
If you really only want this one feature to be DPI aware, then copy the TImageEnIO.CaptureFromScreen() method to a local unit and add some scaling code (e.g. xx := xx * Monitor PixelsPerInch / 96).
I've found the C++ Builder configuration that's causing problems:
We can't activate this parameter because other old components we use don't work properly with this option.
Can you see if a fix is possible when this option is disabled?
xequte
Posted - Aug 29 2023 : 03:11:16 Hi
I'm afraid I don't have that version installed to test. I can confirm that it works fine in Delphi 5, 2007 and 11, so I think there might be something else going on.
You might want to walk through the code to see where it was failing, or use a different method of screen capture.
I cannot reproduce that in v12.5.0. The full window is captured for all scaled screens with iecsSpecifiedMonitor on my test Windows 11 system. However I cannot see any changes to the code since 10.0.1 that should have affected that.