Pixels to DPI

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

I have a simple application written in VB.NET 2005 that draws squares on the
screen. What I would like to do is convert the screen resolution from pixels
to Dots per inch. So I have two problems.

1. Convert the screen from pixels to dots-per-inch.
2. Once I convert the screen to DPIs I would like to draw a grid on the
screen where both the vertical and horizonal lines are spaced 100 dots apart.

Can somebody give me a little help,
 
Mark said:
I have a simple application written in VB.NET 2005 that draws squares
on the screen. What I would like to do is convert the screen
resolution from pixels to Dots per inch. So I have two problems.

1. Convert the screen from pixels to dots-per-inch.
2. Once I convert the screen to DPIs I would like to draw a grid on
the screen where both the vertical and horizonal lines are spaced 100
dots apart.

Can somebody give me a little help,

Look at Graphics.DpiX and Graphics.DpiY.


Armin
 
Back
Top