Hmmmm ... hopefully someone can prevent me from pulling out my last hairs ....
I am building a toolbar using Sheridan's ActiveListBar that will load the item's icon based on the icon associated with the item's EXE. (It's basically a launch pad for my desktop.) Anyhow, I can add the items fine. What I want to do is use the API to pull the first icon from the EXE and display it on the toolbar. I am able to pull the icon with no problem. I am also able to draw it in a picture box using DrawIcon.
According to Sheridan's help file, I can assign the Picture property of the ActiveListBar's Icons collection to the Image property of another control. What I have tried to do is this:
Code:
SSListBar1.IconsLarge(1).Picture = picLarge.Image
On my form, the picturebox displays properly. However the ActiveListBar item becomes blank. Hmmmm ....
I tried refreshing the ActiveListBar and that doesn't help. I have been able to do this:
Code:
SSListBar1.IconsLarge(1).Picture = LoadPicture("C:\WINNT\SOMETHING.EXE")
So I know that I can dynamically update the icon on the tool bar.
I assume that the Picture property of the picturebox is blank because I drew the icon with DrawIcon rather than loading a file.
I'm a bit lost as to what else to try. Any ideas?
The only thing that I have noticed is that when I step through the code in debug mode, the value of
Code:
SSListBar1.IconsSmall(1).Picture
is blank whereas the
does have a value.
Is this indicative of the problem?
Hopefully this explains my problem clearly enough.
Any help would be greatly appreciated.
Thanks!!!
Dan