473,396 Members | 2,002 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Scale Width and ScaleHeight

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
Nov 21 '05 #1
2 2161
Hi,

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

http://msdn.microsoft.com/library/de...sDpiXTopic.asp

Ken
---------------
"Sam" <qd*@datawave.ca> wrote in message
news:ut**************@TK2MSFTNGP14.phx.gbl...
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

Nov 21 '05 #2
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
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl...
Hi,

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

http://msdn.microsoft.com/library/de...sDpiXTopic.asp
Ken
---------------
"Sam" <qd*@datawave.ca> wrote in message
news:ut**************@TK2MSFTNGP14.phx.gbl...
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

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: News Central | last post by:
I resize a control in a Form wth Scale mode set to vbInches. However, the control's size changes in different screen resolution, I thought that if Scale mode is set to vbInchs, then the control...
1
by: EggHead | last post by:
Hi all, I have 2 forms in VB6.0 prj, and both forms have a picture box control. The width in one picture box is 350, and the other picture box control has 1810 in width. However, the picturebox...
7
by: Randy Vande Hei | last post by:
Does anyone know how to change the the GDI+ coordinate system like you used to be able to do in VB6 with the picturebox.scale method. The picturebox.scale method took an x,y point defining the...
2
by: placid | last post by:
Hi all, I was just wondering what is the equivalent of Form1.Scale (-160, -160)-(90, 95) in VB.NET? The Form1.Scale(...) in the VB.net is not the same as the old VB! Thanks in advance
3
by: Jerry Spence1 | last post by:
A very useful feature was added in 2.0 of .NET framework which was the scaling of a form and all the controls within it. This is really useful but I am finding very little information of how to use...
19
by: Matteo Migliore | last post by:
Hi! I've to scale a vector of numbers of size N to a vector of size M. The trasformation is like a zoom on images but I need on a vector. The second size can be M >= N or M <= N, M 0. The...
7
by: sentra50 | last post by:
hello, I am trying to do the following: On load, a form must scale itself with a number of pixels on the X axis, lets say 100 pixels for example. Also it must do this on a timer, to ensure a...
11
by: shapper | last post by:
Hello, I am displaying an image on a few pages. The image size is 50 px height and 50 px width. In some pages I need the image to be 30x30 px in others 40x40 px and in others 50x50px. Can I...
2
by: AliR \(VC++ MVP\) | last post by:
I'm trying to write a RTF render code in C#. I have the code in C++/MFC and it works fine, but I have run into a problem with the C# code. I think the C# code is from Microsoft, and I added...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.