No | Control type | Name | Text |
1 | Form1 | FormRemoveFirstLine | Remove Text At First Line |
2 | TextBox1 | TextBoxWord | |
3 | Button1 | ButtonRemoveFirst | Remove First |
- As you see in the image above, when you click Button "Remove Text", it will remove word "Hello" in TextBox.
Code
Public Class FormRemoveFirstLine
Private Sub ButtonRemoveFirst_Click(sender As Object, e As EventArgs) Handles
ButtonRemoveFirst.Click
Dim Str As String() = Split(TextBoxWord.Text, vbNewLine)
TextBoxWord.Text = String.Join(vbNewLine,
Str, 1, Str.Length - 1)
End Sub
End Class
0 comments:
Post a Comment