IT KNOWLEDGE

IT KNOWLEDGE
BC

Sunday, May 25, 2014

Add New Line of Text in Textbox (VB.Net)

     This tutorial will show you how to add new text to new line in one TextBox. The sample below I use 3 Textboxes which is TextBoxWord1 contains main text and show result too, TextBoxWord2 contains text which will be added to new line and the last textbox is TextBoxWord3 which contains text that will be added to next line of text(TextBoxWord1).



No Control Type Name Text
1 Form1 FormEditTextbox EditTextbox
2 TextBox1 TextBoxWord
3 TextBox2 TextBoxWord1
4 TextBox3 TextBoxWord2
5 Button1 ButtonNewLine New Line

Code
Public Class FormEditTextbox

    Private Sub ButtonNewLine_Click(sender As Object, e As EventArgs) Handles ButtonNewLine.Click
        TextBoxWord.Text = TextBoxWord.Text + Environment.NewLine + TextBoxWord1.Text + Environment.NewLine + TextBoxWord2.Text
    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: