Information générale
Catégorie:
Contrôles ActiveX en VFP
>>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?
>>
>Hiya Steve,
>
>I don't know if this will avoid this problem, but you might also want to look at the Picture Clip control if the images are all the same size. What it allows you to do is create one bitmap containing all the images. You simply need to use the .ListImages.Add() method to add them to the control, referencing the Picture Clip's GraphicCell collection. By combining the images into one file you can reduce the amount of disk I/O by simple loading only one, rather than multiple images.
>
>hth,
Thanks much for the suggestion. I'll try that as soon as the rest of it stabilizes. (We closed yesterday!!!)
Steve
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement