Martin,
Thanks. I had gotten to something similar, but was still not able to
identify the ImageLists. For some reason the Name property is not
available. I just realized that I could use the Tag property, so now I can
actually tell which list is which, e.g.:
Debug.WriteLine(iL.Tag)
Thanks for your help.
Doug
"Martin H." <hk***@gmx.netwrote in message
news:45***********************@news.freenet.de...
Hello Doug,
This code now works. Tested!
Dim t As Integer
Dim iL As ImageList
For t = 0 To Me.components.Components.Count - 1
If TypeOf Me.components.Components(t) Is ImageList Then
iL = Me.components.Components(t)
Debug.WriteLine(iL.ToString)
End If
Next
Best regards,
Martin
Doug Glancy wrote:
>"Herfried K. Wagner [MVP]" <hi***************@gmx.atwrote in message
news:Os**************@TK2MSFTNGP03.phx.gbl...
>>"Martin H." <hk***@gmx.netschrieb:
It works like this:
Dim c As Control
Dim imgL As ImageList
For Each c In Me.Controls
If TypeOf c is ImageList Then
imgL = CType(c, ImageList)
'... Your code here ...
End If
Next
Are you sure this works? ImageList is a component, not a control class.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Herfried,
You are correct. I had tried that and it doesn't work, because the
imagelists are not among the controls. Any ideas?
Thanks,
Doug