IT KNOWLEDGE

IT KNOWLEDGE
BC

Sunday, May 25, 2014

Remove The Text At The First Line in Textbox (VB.Net)


This tutorial will how you how to remove the text at the first line in a textbox. I use one Button with Event_Click when we click the button, it will remove the first line of text in TextBoxWord.
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














Please Give Us Your 1 Minute In Sharing This Post!
SOCIALIZE IT →
FOLLOW US →
SHARE IT →
Powered By: itech-9999

0 comments: