I used the EddiesElectronics database for some experiments with database communication and table handling. I wanted to display the contained customer images in a listbox. So when adding a row, I used the celltag, read the variant value into a memoryblock, created a picture with picture.fromData and put this into the celltag.
I added a Textpaint event to the listbox where I read the image from the celltag of the appropriate column and used Graphics.DrawPicture to paint them.
That worked, but not good. Many of the images only displayed their half, the lower part often missing or gray.
I put a debugger stop into the celltag add and examined the images: Perfect!
I did so when I read them: Garbled!
I could fix this by using the variant as the celltag and creating the image during the textpaint event. Anyway, the images fading makes me believe they are not retained when one uses Picture.FromData. Could it be? Or is there another possible reason they behaved that way?