we use a listview box and we add some path's of the files in list
and now we want to show the file icon with in file path
listview1.item.add " D:\test.txt"
listview1.item.add " D:\picture.jpg"
now we want to show these files icon in my listview
please tell me what i do ?
Jx Man thanks for attaching this project
please dont mind but i want to do this
we use a listview and make two column tabs
listview1.ListItems.Add , , "D:\test.txt"
Now we want to show this file icon in left or right side in the listview
when add any path of file in listview then it will show his file icon
Add one icon with dimension 16x16 to Imagelist.
Then add this code :
Private Sub Command1_Click()
On Error Resume Next
Set .Icons = ImageList
Set .SmallIcons = ImageList
Set View = .ListItems.Add(, , , 1, 1) ' Icon Added
View.SubItems(1) = "This/Where/Path/Added/" & .ListItems.Count 'Path Added
View.SubItems(2) = "Size " & .ListItems.Count 'Size Added