Private Sub Form_Load()
Dim column_header As ColumnHeader
Dim list_item As ListItem
' Create the column headers.
Set column_header = ListView1. _
ColumnHeaders.Add(, , "Abbrev", _
TextWidth("Abbrev"))
Set column_header = ListView1. _
ColumnHeaders.Add(, , "Title", _
TextWidth("Ready-to-Run Visual Basic Algorithms"))
Set column_header = ListView1. _
ColumnHeaders.Add(, , "ISBN", _
TextWidth("0-000-00000-0"))
' Start with report view.
mnuViewChoice_Click lvwReport
' Associate the ImageLists with the
' ListView's Icons and SmallIcons properties.
ListView1.Icons = imgLarge
ListView1.SmallIcons = imgSmall
Set list_item = ListView1.ListItems.Add(, , "VBA")
list_item.Icon = 1
list_item.SmallIcon = 1
list_item.SubItems(1) = "Ready-to-Run Visual Basic " & _
"Algorithms"
list_item.SubItems(2) = "0-471-24268-3"
Set list_item = ListView1.ListItems.Add(, , "VBGP")
list_item.Icon = 1
list_item.SmallIcon = 1
list_item.SubItems(1) = "Visual Basic Graphics " & _
"Programming"
list_item.SubItems(2) = "0-471-15533-0"
Set list_item = ListView1.ListItems.Add(, , "CCL")
list_item.Icon = 1
list_item.SmallIcon = 1
list_item.SubItems(1) = "Custom Controls Library"
list_item.SubItems(2) = "0-471-24267-5"
Set list_item = ListView1.ListItems.Add(, , "AVBT")
list_item.Icon = 1
list_item.SmallIcon = 1
list_item.SubItems(1) = "Advanced Visual Basic " & _
"Techniques"
list_item.SubItems(2) = "0-471-18881-6"
End Sub
|