Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / CLR / May 2006

Tip: Looking for answers? Try searching our database.

How to find screen resolution (DPI) ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tom - 07 May 2006 17:32 GMT
Is there some place to find out what the display screen resolution is in
dots per inch?  So far the only way that is close is to look at

   SystemInformation::CaptionHeight

and compare the size of the caption in pixels at different screen
resolutions
and use that to estimate the display resolution.

For example, CaptionHeight = 32 means screen DPI = 120, and
CaptionHeight = 26 means screen DPI = 96.

Is there a better place to look?

   -- Tom
Jon Shemitz - 07 May 2006 21:15 GMT
> Is there some place to find out what the display screen resolution is in
> dots per inch?  So far the only way that is close is to look at
>
>     SystemInformation::CaptionHeight

System.Windows.Forms.
 Screen.PrinaryScreen.Bounds;

Signature

<http://www.midnightbeach.com>    Contracting, consulting, training

.NET 2.0 for Delphi Programmers  <http://www.midnightbeach.com/.net>
                                 Being printed - in stores by June

Tom - 07 May 2006 23:20 GMT
Thanks, Jon.

Thanks for the clue about screen class. That gives the display extent
(bounds) but not the DPI.

I finally found it at  WhatEverTheCurrentGraphicsContext->graphics->DpiX
and   ->DpiY.
Lots of hours looking for that one...

   -- Tom

>> Is there some place to find out what the display screen resolution is in
>> dots per inch?  So far the only way that is close is to look at
[quoted text clipped - 3 lines]
> System.Windows.Forms.
>  Screen.PrinaryScreen.Bounds;

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.