old Hippy
Gebruiker
- Lid geworden
- 24 mei 2008
- Berichten
- 911
Hallo allemaal
heb een reken probleempje.
moet voor mijn CNC machine alles omrekenen van mm naar inch.
dus iets gemaakt maar werkt niet goed.
0.09 inch moet 0.2286 mm zijn
maar in mijn textbox komt 22.86 mm te staan.
Wat zie ik over het hoofd?
heb een reken probleempje.
moet voor mijn CNC machine alles omrekenen van mm naar inch.
dus iets gemaakt maar werkt niet goed.
0.09 inch moet 0.2286 mm zijn
maar in mijn textbox komt 22.86 mm te staan.
Code:
Try
If TextBoxX1.Text IsNot Nothing And TextBoxX2.Text = "" Then
Dim mm As Decimal = TextBoxX1.Text
Dim inch As Decimal = 0.03937
TextBoxX2.Text = mm * inch
End If
If TextBoxX2.Text IsNot Nothing And TextBoxX1.Text = "" Then
Dim mm As Decimal = 2.54
Dim inch As Integer = TextBoxX2.Text
TextBoxX1.Text = mm * inch
End If
Catch ex As Exception
MsgBox("Geef een getal in", MsgBoxStyle.Information)
End Try
Wat zie ik over het hoofd?