Seems it should work.
Only OleCreatePictureIndirect wants its fourth paramater to be of type IPicture.
Your Result variable is of type Image, which is a control. So maybe this function failed.
You could check if it fails like:
If res is zero the function was successful. A nonzero return value indicates an error.Code:dim res as long res = OleCreatePictureIndirect(pd, IPic(0), True, Result) 'instead of 'OleCreatePictureIndirect pd, IPic(0), True, Result
I'd try
Dim Result as IPicture
instead of an Image.




Reply With Quote