hey im trying to create a program that will convert between metric and standard units.I chose length as my measurement so i have nanometer,millimeter,centimeter,meter,hectometer,kilometer,inc,feet,yard and mile.
i wanted the inpu to be
- number to be converted(text box)
-unit number is in(combo box)
-unit to convert to(combo box)
i know how to do combo boxes,buttons and labels and stuff.
The output is the converted number this is what i have so far but its soooo wrong please help meeeeeeee:(

``````Public Class Form1

Private Sub Convert_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Convert.Click
Dim Inch, Feet, Yard, Mile As Integer
Dim Nanometer, Millimeter, Centimeter, Meter, Hectometer, Kilometer As Double

Mile = CInt(Text)
Yard = CInt(Text)
Feet = CInt(Text)
Inch = 63360 * Mile + 36 * Yard + 12 * Feet + Inch
Meter = (Inch / 39.37)
Kilometer = (Meter / 1000)
Nanometer = (Meter * 1000000000)
Millimeter = (Meter * 10000)
Centimeter = (Meter * 100)
Hectometer=(Meter/100)

End Sub
End Class``````

## All 4 Replies

Please take the time to ask a coherent question. If you can't be bothered to explaini it properly then don't expect a coherent answer. For example

i wanted the inpu to be
- number to be converted(text box)

I presume this means "The number to be converted is input by the user in a textbox". Put a little more effort into the question.

No it means what I said.the number that will be converted(let's say 7)will be in a text box while the units its in will be in one combo box(let's say mm) and the units it will be converted to say m will be in another combo box.

And how is

"The number to be converted is input by the user in a textbox"

different from

the number that will be converted(let's say 7)will be in a text box

No difference.I was explaining it more since you didn't seem to understand.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.