Pixels to DPI

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,
 
A

Armin Zingler

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
 

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