tags:

views:

21

answers:

1

I'm using DSOFile to get the summary properties from some Crystal Reports report files. SummaryProperties.Thumbnail returns an object and I need to convert the object to an image so I can display it as a preview on my form. I have tried casting it to a System.Drawing.Image but I get an error "ImageConverter cannot convert from System.__ComObject."

+2  A: 

It would be a COM interface for images, IPicture or IPictureDisp, probably. You could use the AxHost.GetPictureFromIPicture or GetPictureFromIPictureDisp static method to make the conversion.

Hans Passant
It took some more googling to find out I had to implement AxHost to use the GetPictureFromIPicture method, but I got it, thanks.
Beaner