你应该给个错误截图,否则没头没脑怎么看呢?
蒙一下, 估计问题出在这行:
ImageList.Images.Add(image(1) - 1,GetImage(image(0)))
改为:
Public ImageList As New System.Windows.Forms.ImageList()
Sub new
ImageList.ImageSize = New System.Drawing.Size(48, 48) '设置图标大小
Dim images As List(of String()) = DataTables("业务导航").GetUniqueValues("","节点图标","节点编号")
For Each image As String() In images
If image(1)>"" Then
If IsNumeric(image(1)) AndAlso image(0) > "" Then
Dim img As system.drawing.image = GetImage(image(0))
If img IsNot Nothing
ImageList.Images.Add(cint(image(1)) - 1,img)
End If
End If
End If
Next
End Sub