How to get monitor size?

  • Thread starter Thread starter Polaris
  • Start date Start date
P

Polaris

Hi Experts:

Using C#, is there a way to get the display monitor's size in inches (for
example, I'd like to know if the monitor size is 15", 17" or whatever)?

Thanks in Advance
Polaris
 
No guaranteed way to get inches, even what Paul has suggested, as it is not
a required component of the interface between the monitor and Windows. You
can, as Paul has stated, get resolution.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss

or just read it:
http://gregorybeamer.spaces.live.com/

*************************************************
| Think outside the box!
|
*************************************************
 
Thanks. I tried that also, but the DpiX/DpiY didi not change when I change
the monitor resolution. Looks like they represent native resolutions only.
 
DPI (dots per inch) isn't the same thing as PPI (pixels per inch). The only way to get the true PPI of the current display is to divide the current resolution (width/height) by the monitors width and height in inches. Outside GetDeviceCaps, I don't believe there is a straightforward way to get the phisycal dimensions of the display.

DPI refers to ink droplet density in a priner matrix.
 
Back
Top