STDole image to bitmap

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.
 
N

Nicholas Paldino [.NET/C# MVP]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top