23-08-16, 02:12 PM
PHP كود :
Private Sub TextBox1_KeyDown(sender As Object, e As KeyEventArgs) Handles TextBox1.KeyDown
If e.KeyCode = Keys.Enter Then
Dim box As TextBox = CType(sender, TextBox)
Dim currentString As String = box.Text
If Not String.IsNullOrEmpty(currentString) Then
Dim s As String = TextBox2.Text
If Not String.IsNullOrEmpty(s) Then
TextBox2.AppendText(Environment.NewLine)
TextBox2.AppendText(currentString)
Else
TextBox2.Text = currentString
End If
End If
box.Text = ""
End If
End Sub

