How do I determine the true pixel size of my Monitor in .NET?

前端 未结 6 1264
生来不讨喜
生来不讨喜 2020-11-29 07:09

I want to display an image at \'true size\' in my application. For that I need to know the pixel size of the display.

I know windows display resolution is nominally

6条回答
  •  萌比男神i
    2020-11-29 07:38

    You may obtain the physical dimensions of the display using the EDID information stored in the registry. You can obtain the appropriate monitor's registry key using the EnumDisplayDevices windows API call.

    Physical Dimensions to the Screen object:

提交回复
热议问题