Se tu fossi in visual basic faresti così:
traduci in Vb.Netcodice:Private Sub Text1_Change() c = Right(Text1.Text, 1) If c = "" Then Exit Sub If IsNumeric(c) = False Or c = "," Then Text1.Text = Left(Text1.Text, Len(Text1.Text) - 1) Text1.SelStart = Len(Text1.Text) Text1.SelLength = 0 ElseIf Text1.Text = "" Then Exit Sub End If End Sub
ciao

Rispondi quotando