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)
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.