Article ID: 142468
Article Last Modified on 10/20/2003
Private Sub Check1_Click()
ListView1.Visible = Check1.Value = 1
End Sub
Private Sub Form_Load()
'Set the ListView control's Column Headers
Dim clmX As ColumnHeader
Set clmX = ListView1.ColumnHeaders.Add(, , "Author", _
ListView1.Width / 3)
Set clmX = ListView1.ColumnHeaders.Add(, , "Author ID", _
ListView1.Width / 3, lvwColumnCenter)
Set clmX = ListView1.ColumnHeaders.Add(, , "Birthdate", _
ListView1.Width / 3)
'Set the ListView control's view property to show a "Report" view
ListView1.View = lvwReport
'Add ListItems to the ListView control
'Use an icon file and a bitmap file that comes with Visual Basic
Dim imgX As ListImage
Set imgX = ImageList1.ListImages.Add(, , LoadPicture _
("C:\VB\ICONS\WRITING\NOTE06.ICO"))
Set imgX = ImageList2.ListImages.Add(, , LoadPicture _
("C:\VB\REPORT\PROLOGOB.BMP"))
ListView1.Icons = ImageList1
ListView1.SmallIcons = ImageList2
Set itmX = ListView1.ListItems.Add(, , "John Doe")
itmX.SubItems(1) = "John Dow Sub item"
End Sub
Keywords: kbbug kbfix kbvbp500fix kbctrl KB142468