所以我想将URL中的图像添加到我的列表视图中。
这是我的代码到目前为止,但它仅适用于来自PC的图像,我不知道如何使用来自网址的图像。
'Outside subs
Dim imgList As New ImageList
'On form load
ListView1.Columns.Add("Picture", 53, HorizontalAlignment.Left)
ListView1.Columns.Add("Username", 145, HorizontalAlignment.Left) '163
ListView1.AllowColumnReorder = True
ListView1.Columns(1).DisplayIndex = 1
imgList.ImageSize = New Size(48, 48)
imgList.Images.Add("Picture", Image.FromFile("C:\Users\USERNAME\Downloads\image.png"))
ListView1.SmallImageList = imgList
'On button
Dim index As Integer = 0
Dim lvi As New ListViewItem
lvi.ImageIndex = index
lvi.SubItems.Add("text")
ListView1.Items.Add(lvi)