Different images for different resolutions?

  • Thread starter Thread starter Ole
  • Start date Start date
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
 
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.
 
How does the system determine that it is a high resolution display on a
Pocket PC, so that it autoscales the controls?

BR
Ole
 
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
 
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
 
Back
Top