Private Sub textfield10_TextChanged (Old As String, New As String)
If textfield10.Text = "" Then
Return
Else
Dim chrtolookat As String = textfield10.Text.CharAt(textfield10.Text.Length - 1)
Select chrtolookat
Case "0","1","2","3","4","5","6","7","8","9"
Return
Case "."
If (Old.Contains(".") Or Old.Contains(",")) Then
textfield10.Text = textfield10.Text.SubString2(0,textfield10.Text.Length - 1)
textfield10.SetSelection(textfield10.Text.Length,textfield10.Text.Length)
Else
Return
End If
Case ","
If (Old.Contains(".") Or Old.Contains(",")) Then
textfield10.Text = textfield10.Text.SubString2(0,textfield10.Text.Length - 1)
textfield10.SetSelection(textfield10.Text.Length,textfield10.Text.Length)
Else
Return
End If
Case Else
textfield10.Text = textfield10.Text.SubString2(0,textfield10.Text.Length - 1)
textfield10.SetSelection(textfield10.Text.Length,textfield10.Text.Length)
End Select
End If
End Sub