Tuesday 7 August 2012

listbox in vb.net

This tutorial will introduce the ListBox object and give you a basic understanding of how it works. There are more practical uses than the one shown in this application but as we are still in the early stages, this example is for beginners. In depth to tell about list box add item line by line, for example you’re adding text in textbox and want that text in list box use this tutorial you can add text from text box to list box Syntax: ListBox1.Items.Add(TextBox1.Text) This will copy the content in textbox.text to list box line by line Copy and paste below Code:
Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        ListBox1.Items.Add(TextBox1.Text)
    End Sub

End Class