RocAFella2007
Technical User
Hi, basically I have two textboxes. Text is entered into textbox1, whenever a numeric value is entered in textbox1 I want that value shown in textbox2, I want this done straight away, also I want the default value of textbox2 to be '0'.
I have the following coding:
Private Sub TextBox1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
TextBox2.Clear()
For Each c As Char In TextBox1.Text
If Char.IsDigit(c) Then
TextBox2.AppendText(c)
End If
Next
End Sub
It is working but could somebody help me on the default value part? Thanks
I have the following coding:
Private Sub TextBox1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
TextBox2.Clear()
For Each c As Char In TextBox1.Text
If Char.IsDigit(c) Then
TextBox2.AppendText(c)
End If
Next
End Sub
It is working but could somebody help me on the default value part? Thanks