ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 CaptureFromScreen issue
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

papa.john

3 Posts

Posted - Sep 20 2023 :  03:26:39  Show Profile  Reply
Hello. I came across this problem. If the system's screen scaling is set to more than 100% and Unaware is selected in "DPI Awareness" (Project -> Options -> Application -> Manifest), then screenshots created by the ImageEnIO.CaptureFromScreen(iecsScreen) function are truncated.

The problem can be solved by changing the DPI Awareness settings from Unaware to any other (for example PerMonitor2), but it will lead to remaking my application GUI for supporting different screen DPI. Is it possible somehow to make full-sized screenshots without changing DPI Awareness and system's screen scaling?

Cropped screenshot: https://ibb.co/9qGgWkb
System's screen scaling: https://ibb.co/pzPTPJx
DPI Awarness section: https://ibb.co/kcsfYVy

I use Windows 10 22H2 and Delphi 10.4

xequte

38448 Posts

Posted - Sep 21 2023 :  01:02:54  Show Profile  Reply
Hi

Unfortunately, by nature, if you specify that the application is unaware of scaling then the values returned by internal calls such as GetSystemMetrics() and Screen.Monitors are already scaled without there being a reasonable method to know that they're scaled.

I will add a warning to the documentation.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: