Why seeing wrong DPI in Visual Studio 2019, .NET 3.5?
It is showing me a DPI of 96, though the screen is at 125%.
Code:
Using g = frm.CreateGraphics()
Dim xDpi = g.DpiX
Dim scrScale As Single = xDpi / 96.0
Another thing - why is there is 8 pixel difference between frm.Left and frm.PointToScreen(frm.ClientRectangle.Location).X? The forms no longer have thick walls like earlier.
Is this supposed to work?
scrX1 = frm.PointToScreen(frm.ClientRectangle.Location).X
scrY1 = frm.PointToScreen(frm.ClientRectangle.Location).Y
g.CopyFromScreen(scrX1, scrY1, 0, 0, img.Size, CopyPixelOperation.SourceCopy)
Is the last parameter unnecessary?