How to get monitor size?

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
 
C

Cowboy \(Gregory A. Beamer\)

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!
|
*************************************************
 
P

Polaris

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.
 
P

Phil

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top