Making icons appear in List View controls

Hi,

How do I make icons appear next to each row in a List View which is in lvwReport mode (in a similar way to Windows Explorer displaying a specific icon to represent the specific program each file is associated with).
gizzAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

halapayaCommented:
for example u can do it this way

   ' Create an object variable for the ColumnHeader object.
   Dim clmX As ColumnHeader
   ' Add ColumnHeaders. The width of the columns is the width
   ' of the control divided by the number of ColumnHeader objects.

   Set clmX = ListView1.ColumnHeaders. _
   Add(, , "Company", ListView1.Width / 3)
   Set clmX = ListView1.ColumnHeaders. _
   Add(, , "Address", ListView1.Width / 3)
   Set clmX = ListView1.ColumnHeaders. _
   Add(, , "Phone", ListView1.Width / 3)
   
' Set BorderStyle property.
  ListView1.BorderStyle = ccFixedSingle

' Set View property to Report.
  ListView1.View = lvwReport    

'assing two image lists
'smallicons and one for normal icons

   ListView1.Icons = ImageList1
   ListView1.SmallIcons = ImageList2

'add an item to listview
Set itmX = ListView1.ListItems.Add(, , "item one")

' Set an icon from ImageList1.
itmX.Icon = 1        

'Set an icon from ImageList2.
itmX.SmallIcon = 1  
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.