|
-
Aug 24th, 2024, 11:48 AM
#1
Thread Starter
Member
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?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|