12. list view


 

form1.vb

Public Class Form1


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

        Dim str(2) As String

        Dim itm As ListViewItem

        str(0) = TextBox1.Text  'Accept value from the user.

        str(1) = TextBox2.Text

        itm = New ListViewItem(str)

        ListView1.Items.Add(itm) 'Add the items into the ListView

        TextBox1.Clear()

        TextBox2.Clear()

 

    End Sub

End Class