So for I made .net winform and set its size to 600 by 600
in its properties in the Designer. Although when I do a Debug.WriteLine(Width.Height)
and Debug.WriteLine(Width.Height)
it comes out as 452 by 488
. How can this be the case?
Asked
Active
Viewed 125 times
0
-
Also: Is your application dpi aware? – TaW Dec 13 '19 at 16:09
-
3That's pretty normal, your monitor resolution is set to 125%. If you don't want the DPI virtualization feature to rescale the window then you have to declare your app [to be dpiAware](https://stackoverflow.com/a/13228495/17034). Just keep in mind that what you see now is what a user will see who runs their monitor at 100%. Use VS2017 or later to design at 100% – Hans Passant Dec 13 '19 at 16:10