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

前端 未结 6 1272
生来不讨喜
生来不讨喜 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条回答
  •  醉梦人生
    2020-11-29 07:29

    You can check by just manually calculating from your screen size

    cos(45)*LCD_SCREEN_DIAGONAL_IN_INCHES/sqrt(HORZ_RES^2 + VERT_RES^2)
    

    That would give you the pixel width in inches

提交回复
热议问题