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 / Compact Framework / March 2007

Tip: Looking for answers? Try searching our database.

Different images for different resolutions?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ole - 29 Mar 2007 09:47 GMT
I have made a custom control (an image button). What is the "proper" way to
have an image for each screen resolution? How do I detect which resoultion
(DPI) the device display has during runtime, so that I can load the correct
image and draw with the correct line thickness etc.?

Thanks,
Ole
<ctacke/> - 29 Mar 2007 13:19 GMT
Screen.PrimaryScreen.Bounds

Signature

Chris Tacke - Embedded MVP
OpenNETCF Consulting
Managed Code in the Embedded World
www.opennetcf.com
--

>I have made a custom control (an image button). What is the "proper" way to
>have an image for each screen resolution? How do I detect which resoultion
[quoted text clipped - 3 lines]
> Thanks,
> Ole
Ole - 29 Mar 2007 13:38 GMT
Thanks! - Is there also a way to detect the resolutio in DPI?

BR
Ole

> Screen.PrimaryScreen.Bounds
>
[quoted text clipped - 5 lines]
>> Thanks,
>> Ole
<ctacke/> - 29 Mar 2007 13:49 GMT
The OS provides no mechanism to query the physical dimensions of the panel
so I don't think there's any way to determine dpi.

Signature

Chris Tacke - Embedded MVP
OpenNETCF Consulting
Managed Code in the Embedded World
www.opennetcf.com
--

> Thanks! - Is there also a way to detect the resolutio in DPI?
>
[quoted text clipped - 10 lines]
>>> Thanks,
>>> Ole
Ole - 29 Mar 2007 14:42 GMT
How does the system determine that it is a high resolution display on a
Pocket PC, so that it autoscales the controls?

BR
Ole

> The OS provides no mechanism to query the physical dimensions of the panel
> so I don't think there's any way to determine dpi.
[quoted text clipped - 13 lines]
>>>> Thanks,
>>>> Ole
Daniel Moth - 29 Mar 2007 14:49 GMT
You can query the resolution by looking at the DpiX/DpiY properties of a
Graphics object that you get e.g. from a Form.CreateGraphics.

Cheers
Daniel
--
http://www.danielmoth.com/Blog/

> How does the system determine that it is a high resolution display on a
> Pocket PC, so that it autoscales the controls?
[quoted text clipped - 19 lines]
>>>>> Thanks,
>>>>> Ole
Ole - 30 Mar 2007 16:05 GMT
Great - thanks - works very well!

> You can query the resolution by looking at the DpiX/DpiY properties of a
> Graphics object that you get e.g. from a Form.CreateGraphics.
[quoted text clipped - 27 lines]
>>>>>> Thanks,
>>>>>> Ole

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.