System dpi

S

Steve Long

Hello,
can anyone tell me how to detect a system's settings for dpi settings on the
display properties dialog? For instance, it can be set to:
Normal (96 dpi)
Large size (120 dpi)
or
Custom size.

I'd like to do this on application start up and then just run with whatever
setting I find at that time. I've been looking and the System.Management
objects but have found the lacking so far.

Thanks in advance for your help.

Steve
 
S

Steve Long

Well never mind. I suppose I could just do:

Graphics g = this.CreateGraphics()
g.DpiX

should do it but I wasn't sure.

Steve
 
V

Vadym Stetsyak

Hello, Steve!
You wrote on Mon, 2 Oct 2006 12:53:03 -0700:

SL> Hello,
SL> can anyone tell me how to detect a system's settings for dpi
SL> settings on the
SL> display properties dialog? For instance, it can be set to:
SL> Normal (96 dpi)
SL> Large size (120 dpi)
SL> or
SL> Custom size.

SL> I'd like to do this on application start up and then just run with
SL> whatever
SL> setting I find at that time. I've been looking and the
SL> System.Management
SL> objects but have found the lacking so far.

SL> Thanks in advance for your help.

You can use EnumDisplaySettings API to retrieve the info
(
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/devcons_84oj.asp )
( http://www.codeproject.com/csharp/CSDynamicScrRes.asp )



With best regards, Vadym Stetsyak.
Blog: http://vadmyst.blogspot.com
 

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