2

I am trying to write custom application for my own use. I found this project: https://www.codeproject.com/Articles/21913/TeboScreen-Basic-C-Screen-Capture-Application and I am modifying it for my own use. Application works fine only when I have windows scaling set to 100%, I normally use 125% scaling and when I have it to 125% or 150, it takes a little bit different region as screenshot. I tried to modify CopyfromScreen part which really should be issue:

g.CopyFromScreen(
    Convert.ToInt32(SourcePoint.X/1.25),
    Convert.ToInt32(SourcePoint.Y/1.25),
    Convert.ToInt32(DestinationPoint.X/1.25),
    Convert.ToInt32(DestinationPoint.Y/1.25),
    new Size(3840,2160)
);

but it has no effect on it. in fact when I take screenshot its resolution is 3072x1728 and my default resolution is 3840x2160 and I do not use multi monitor setup.

Camilo Terevinto
  • 31,141
  • 6
  • 88
  • 120

1 Answers1

0

please see How to get Windows Display settings?

something similar to this worked for me

William
  • 491
  • 5
  • 9