1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
Private Sub Txtmontantc_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Txtmontantc.TextChanged
Try
Txtmontantc.Text = Txtmontantc.Text.Replace(".", ",")
Txtmontantc.Select(Txtmontantc.Text.Length, 0)
If Txtmontantc.Text = "" Then
Txtmontantc.Text = ""
Txtresteapayer.Text = ""
Else
Dim resultat As [Decimal] = CDec(Txtmontantc.Text)
Txtresteapayer.Text = resultat.ToString
End If
Catch ex As Exception
MsgBox("Vous devez siair une valeur monétaire")
End Try
End Sub |