By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,894 Members | 1,942 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,894 IT Pros & Developers. It's quick & easy.

System dpi

P: n/a
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
Oct 2 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Well never mind. I suppose I could just do:

Graphics g = this.CreateGraphics()
g.DpiX

should do it but I wasn't sure.

Steve

"Steve Long" <St**********@NoSpam.comwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
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

Oct 2 '06 #2

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

SLHello,
SLcan anyone tell me how to detect a system's settings for dpi
SLsettings on the
SLdisplay properties dialog? For instance, it can be set to:
SLNormal (96 dpi)
SLLarge size (120 dpi)
SLor
SLCustom size.

SLI'd like to do this on application start up and then just run with
SLwhatever
SLsetting I find at that time. I've been looking and the
SLSystem.Management
SLobjects but have found the lacking so far.

SLThanks in advance for your help.

You can use EnumDisplaySettings API to retrieve the info
(
http://msdn.microsoft.com/library/de...vcons_84oj.asp )
( http://www.codeproject.com/csharp/CSDynamicScrRes.asp )

With best regards, Vadym Stetsyak.
Blog: http://vadmyst.blogspot.com
Oct 2 '06 #3

P: n/a
Thanks Vadym. I'll give a look at that too.

Steve

"Vadym Stetsyak" <va*****@ukr.netwrote in message
news:e1**************@TK2MSFTNGP02.phx.gbl...
Hello, Steve!
You wrote on Mon, 2 Oct 2006 12:53:03 -0700:

SLHello,
SLcan anyone tell me how to detect a system's settings for dpi
SLsettings on the
SLdisplay properties dialog? For instance, it can be set to:
SLNormal (96 dpi)
SLLarge size (120 dpi)
SLor
SLCustom size.

SLI'd like to do this on application start up and then just run with
SLwhatever
SLsetting I find at that time. I've been looking and the
SLSystem.Management
SLobjects but have found the lacking so far.

SLThanks in advance for your help.

You can use EnumDisplaySettings API to retrieve the info
(
http://msdn.microsoft.com/library/de...vcons_84oj.asp )
( http://www.codeproject.com/csharp/CSDynamicScrRes.asp )

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

Oct 2 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Browse more C# / C Sharp Questions on Bytes