Private Sub DecimalToCurrency(ByVal sender As Object, ByVal cevent As ConvertEventArgs)
If IsDBNull(cevent.Value) Then Exit Sub
cevent.Value = CDec(cevent.Value).ToString("c")
End Sub
Private Sub CurrencyToDecimal(ByVal sender As Object, ByVal cevent As ConvertEventArgs)
If IsDBNull(cevent.Value) Then Exit Sub
cevent.Value = Decimal.Parse(cevent.Value.ToString(), Globalization.NumberStyles.Currency, Nothing)
End Sub
Sub Form_Load
Dim b As Binding
b = txtFakturaSumma.DataBindings("Text")
AddHandler b.Format, AddressOf DecimalToCurrency
AddHandler b.Parse, AddressOf CurrencyToDecimal
End Sub