|
-
May 17th, 2009, 05:02 PM
#1
Thread Starter
New Member
Last edited by winallsys; May 17th, 2009 at 05:03 PM.
Reason: another question
-
May 17th, 2009, 05:31 PM
#2
Re: Easy Conversions? (e.g. Millimeters to Inches)
For each item in a combo, keep track of how many of the smallest unit (presumably millimetres) it is - so a centimetre is 10, an inch is something like 25.4, etc.
You can then divide your number by the scale in one combo, and multiply by the scale in the other.
For a value of 50, the conversion from cm to inches would be: 50 / 25.4 * 10, which is about 20
(EDIT: Is this the right section? My app is for Windows Mobile, but this is conceptual VB...)
While it is general VB at the moment, that may change... so this forum is apt.
-
May 17th, 2009, 05:46 PM
#3
Thread Starter
New Member
Re: Easy Conversions? (e.g. Millimeters to Inches)
Ok, this is going to sound really stupid, but you take the textbox data, divide it by the scale in the other combobox, and multiply it by the other? Can you please give me another example? Thanks again for your quick and great response. 
EDIT: So how would you find the scale numbers? Thanx again.
Last edited by winallsys; May 17th, 2009 at 05:47 PM.
Reason: another question
-
May 18th, 2009, 11:16 AM
#4
Re: Easy Conversions? (e.g. Millimeters to Inches)
Another example would be 2 metres to centimetres
A metre is 1000mm and a centimetre is 10mm, so it would be:
2 [m] / 10 [mm per cm] * 1000 [mm per m] = 200 [cm]
There are many places to find out the scale, including google. The important thing is to have them all measured in the same units (such as mm).
-
May 19th, 2009, 07:40 PM
#5
Thread Starter
New Member
Re: Easy Conversions? (e.g. Millimeters to Inches)
Ok, thanks! You were so helpful!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|