473,408 Members | 2,477 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

System dpi

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
3 6955
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Terrence | last post by:
I am doing some of the C# walkthroughs to transition from VB to C#. When I try to execute static void Main() { Aplication.Run(new Form1()) } I raise a 'System.NullReferenceException" in...
2
by: Scott | last post by:
Not sure if this is the right place to post this or not, but I am in the process of trying to find a Web Hosting/Isp Billing system that is reasonable in price and uses Access or SQL Server for a...
0
by: muralidharan | last post by:
WebForm1.aspx Code: <%@ Register TagPrefix="ComponentArt" Namespace="ComponentArt.Web.UI" Assembly="ComponentArt.Web.UI" %> <ComponentArt:TreeView id="TreeView1" Height="520"...
5
by: laks | last post by:
Hi I have the following xsl stmt. <xsl:for-each select="JOB_POSTINGS/JOB_POSTING \"> <xsl:sort select="JOB_TITLE" order="ascending"/> This works fine when I use it. But when using multiple...
0
by: NicK chlam via DotNetMonster.com | last post by:
this is the error i get System.Data.OleDb.OleDbException: Syntax error in INSERT INTO statement. at System.Data.Common.DbDataAdapter.Update(DataRow dataRows, DataTableMapping tableMapping) at...
1
by: Sky | last post by:
Yesterday I was told that GetType(string) should not just be with a Type, but be Type, AssemblyName. Fair enough, get the reason. (Finally!). As long as it doesn't cause tech support problems...
3
by: forest demon | last post by:
for example, let's say I do something like, System.Diagnostics.Process.Start("notepad.exe","sample.txt"); if the user does a SaveAs (in notepad), how can i capture the path that the user...
1
by: mfunkmann | last post by:
Hi, I recently got an error and I don't know how to fix it: Error 1 'System.Data.DataColumn' does not contain a definition for 'Windows' C:\c#\CsharpPRO\Form1.Designer.cs 304 77 CsharpPRO I...
2
by: =?Utf-8?B?TmF0aGFuIFdpZWdtYW4=?= | last post by:
Hi, I am wondering why the .NET Framework is quite different from Win32 API when it comes to displaying system modal message boxes. Consider the four following types of system modal message...
3
by: Mike | last post by:
Hi I have problem as folow: Caught Exception: System.Configuration.ConfigurationErrorsException: An error occurred loading a configuration file: Request for the permission of type...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.