1
포스터와 DVD 컬렉션의 제목으로 listview (타일)를 채우려하고 있지만 제목 만 표시됩니다. .?. listview 타일이 이미지를 표시하지 않음 (.NET2.0, VB, winforms)
이
내 코드입니다 : 사전에 이Private Sub fillListView(ByVal listView As System.Windows.Forms.ListView, ByVal col As Collection)
listView.Items.Clear()
myImageList = New ImageList()
For Each item As bsDVD In col
Try
myImageList.Images.Add(Image.FromFile(Application.StartupPath & item.PosterURL))
Catch ex As Exception
MessageBox.Show(ex.message)
End Try
Next
myImageList.ImageSize = New Size(32, 32)
listView.LargeImageList = myImageList
For Each item As bsDVD In col
listView.Items.Add(item.Titel)
Next
End Sub
많은 그것은 내가 바보 같은 실수를하거나 누군가가 나를 도울 수 있기를 바랍니다나요 :(작업을 진행하지 못할 시도
타이
타이 저를 도와 주셔서 ...
솔루션 코드를 모두 :
Private Sub fillListView(ByVal listView As System.Windows.Forms.ListView, ByVal col As Collection)
listView.Items.Clear()
myImageList = New ImageList()
myImageList.ImageSize = New Size(70, 100)
myImageList.ColorDepth = ColorDepth.Depth24Bit
For Each item As bsDVD In col
Try
myImageList.Images.Add(Image.FromFile(Application.StartupPath & item.PosterURL))
Catch ex As Exception
MessageBox.Show("Kan afbeelding niet inladen!")
End Try
Next
listView.LargeImageList = myImageList
Dim mItem As bsDVD
For i As Integer = 1 To col.Count
mItem = CType(col.Item(i), bsDVD)
listView.Items.Add(mItem.Titel)
listView.Items(i - 1).ImageIndex = (i - 1)
Next
End Sub