ByteScout Screen Capturing SDK - Windows - Fix Scaling and Incorrect Coordinates - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

ByteScout Screen Capturing SDK – Windows – Fix Scaling and Incorrect Coordinates

  • Home
  • /
  • Articles
  • /
  • ByteScout Screen Capturing SDK – Windows – Fix Scaling and Incorrect Coordinates

How to fix scaling and incorrect coordinates in Windows and ByteScout Screen Capturing SDK

ByteScout Screen Capturing SDK is the tool for developers who want to add screen capturing in their application. Can record screen into video and into single screenshots. Output formats are WMV, AVI, WebM for video and PNG for screenshots. You can adjust output video size, quality, resolution, framerate, video and audio codecs. Includes special privacy features for blacking out sensitive information on screen. Can also capture video from web camera, can add overlays with text or images.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

HowTo.txt
      
## How to Solve Issues with Scaling #### Issues to be solved: - incorrect coordinates for mouse cursor when recording video from screen. - incorrect scaling or incorrect area on Windows with non-standard DPI (High DPI) settings or display or screen scaling enabled. #### Solution For Windows 10: Screen Capturing SDK automatically checks scaling and DPI settings and adjusts coordinates when needed. For Windows XP to Windows 8: need to add "manifest" file to enable "dpi awareness" flag for your application. With this flag Windows will adjust pass correct coordinates to ByteScout Screen Capturing SDK and to your application. IMPORTANT 1: when screen DPI or scaling settings are changed (from 100% to lets say 125%) then the user MUST log out and then log in (or restart the machine) for the application to work correctly. IMPORTANT 2: the application that uses SDK has to declare itself as "DPI Aware". After this the application will get correct coordinates from Windows. HOW TO ADD "DPI Awareness" FLAG: Solution from Microsoft: https://msdn.microsoft.com/en-us/library/windows/desktop/mt846517%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396 From Stackoverflow (different Visual Studio versions): https://stackoverflow.com/questions/6050478/how-do-i-create-edit-a-manifest-file Now, to make ScreenCapturingConsoleTest C++ application DPI aware, I have added additional Manifest file (in the project the file is called manifest.xml). You have to add this in the ManifestTool, like in the image: manifest_configuration In Visual Studio 2005 or later you can't explicitly add manifest file to the project. You'll have to do it manually. The explanation is here: https://support.microsoft.com/en-za/help/944276/how-to-embed-a-manifest-file-in-an-executable-file-in-visual-studio-20 For C++ apps, starting from VS 2010, you can add manifest files directly from the project in VS. It will be embedded in the final executable. HOW TO CHECK IF YOUR APP IS DPI AWARE: You can check it with SysInternals Process Explorer (https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer) Enable and select the "DPI Awareness Column". If your app is "DPI Aware" then it will display "System Aware" or "Per Monitor Aware". If it is not dpi aware then it will display "Unaware".

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Screen Capturing SDK Home Page

Explore ByteScout Screen Capturing SDK Documentation

Explore Samples

Sign Up for ByteScout Screen Capturing SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Screen Capturing SDK Home Page

Explore ByteScout Screen Capturing SDK Documentation

Explore Samples

Sign Up for ByteScout Screen Capturing SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next