Si, muchas gracias?
Oye electro que opinas
Dim value As Double
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
value = TextBox1.Text
TextBox2.Text = (value.ToString("###,###,###,###"))
End Sub
Para formatear
un número está muy bien...si esa es tu intención, pero para sumar no, no puedes sumar strings, y se concatenan en lugar de sumarse.
prueba así:
Public Class Form1
Public Property n1() As Double
Get
Return TextBox1.Text
End Get
Set(ByVal value As Double)
TextBox1.Text = value.ToString("###,###,###,###")
End Set
End Property
Public Property n2() As Double
Get
Return TextBox2.Text
End Get
Set(ByVal value As Double)
TextBox2.Text = value.ToString("###,###,###,###")
End Set
End Property
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox3.Text = FormatNumber(n1 + n2, TriState.False)
End Sub
End Class