Scale Width and ScaleHeight

S

Sam

Hello

Does anyone have an alternative to convert a panel's width and height in
pixels to Inches other than assuming that there are 96 pixels per inch and
then Width/96 Height/96? I also need to track down distance in the mouse
move event in inch. Thanks in advance for all suggestions

Sam
 
K

Ken Tucker [MVP]

Hi,

Take a look at the graphics classes. dpix and dpiy properties

http://msdn.microsoft.com/library/d.../frlrfSystemDrawingGraphicsClassDpiXTopic.asp

Ken
---------------
Hello

Does anyone have an alternative to convert a panel's width and height in
pixels to Inches other than assuming that there are 96 pixels per inch and
then Width/96 Height/96? I also need to track down distance in the mouse
move event in inch. Thanks in advance for all suggestions

Sam
 
S

Sam

Hi Ken

I tried that on my computer and 96 is what returned. Having to convert the
width of my panel and distance move by the the mouse extensively can result
2 or 3 pixels different. I did not have the same problem with VB6

SAM
 

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