Different images for different resolutions?

O

Ole

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
 
G

Guest

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.
 
O

Ole

How does the system determine that it is a high resolution display on a
Pocket PC, so that it autoscales the controls?

BR
Ole
 
D

Daniel Moth

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
 
O

Ole

Great - thanks - works very well!


Daniel Moth said:
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
 

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