Help with text box.

You know like on some chat program when you send a msg to the chat it allows you to hit the up and down arrow on the text box you enter your text in to show the messages you already sent. How can i do that



Answer this question

Help with text box.

  • percent20net

    hi,

    you add 2 textbox to your form, every textbox has scrollbar property you can add scrollbars virticaly, also you will need to allow multiline in textbox properties

    you can use something like this code in your button event handler

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

    TextBox1.Text += TextBox2.Text & vbCrLf

    TextBox2.Text = ""

    End Sub

    hope this helps



  • Help with text box.