STDole image to bitmap

  • Thread starter Thread starter Craig
  • Start date Start date
C

Craig

I am using the msvidctl to capture display input on my pc from a tv card. I
would like to press a button to capture an image, so use the "capture"
method of the msvidctl object but am unable to assing this to a bitmap. I
get the following error.

Error 2 Cannot implicitly convert type 'stdole.IPictureDisp' to
'System.Drawing.Bitmap'

and I can't find a way to convert one type to another.

Any help would be gratefully received.
 
Craig,

I would add a reference to Microsoft.VisualBasic.Compatability.dll.
Then, I would call the static IPictureDispToImage method on the Support
class in the Microsoft.VisualBasic.Compatibility.VB6 namespace. That should
do exactly what you want.

Hope this helps.
 
Back
Top