Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TreeView, ImageList error with LoadPicture
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00176276
Message ID:
00176765
Views:
36
>Aren't you using the Add method of the ListImages Collection of the ImageList Control? I just tested this and it works correctly. Did you install anything new on your machine by chance??
>
>>I'm running into an error while loading pictures to an imagelist for a treeview. OLE error code 0x800a01e1: Unknown COM status code
>>
>>I was running this treeview in an exe all morning. The other day, this happened with bmp graphics. I changed the bmp to an ico and things were fine. Now I'm getting this message on ico graphics too.
>>There is a method in the treeview's parent container called .AddPictures which takes an array of graphics to load into the imagelist. It's in a FOR loop to load all pictures in the array.
>>
>>.Add(lnPicture, ;
>> laPictures[lnPicture, 1], ;
>> LoadPicture(laPictures[lnPicture, 2]))
>>
>>laPictures is two columns.
>>
>>1 = A text key "Close"
>>2 = path to graphic "\BaseFolder\Graphics\Clsdfld.ico"
>>
>>Any known issues with loading an imagelist this way?
>>
>>Steve

Hi John,

Yes, it is the .Add for the ListImages. I believe that Doug Hennig's response is what is happening here. Jose also correctly noted that it works fine in a dev environment which is also happening for me. If run outside of the exe, things are fine, within the exe, whoops. I suspect your test was of a similar nature.

Steve
Previous
Reply
Map
View

Click here to load this message in the networking platform