473,503 Members | 2,150 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

STDole image to bitmap

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.
Jun 22 '06 #1
1 3596
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.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Craig" <cr***********@blueyonder.co.uk> wrote in message
news:Qz********************@fe3.news.blueyonder.co .uk...
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.

Jun 22 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
31769
by: Anand Ganesh | last post by:
HI All, I have an Image. I want to clip a portion of it and copy to another image. How to do this? I know the bounding rectangle to clip. Any suggestions please. Thanks for your time and...
1
5283
by: Sagaert Johan | last post by:
How can i put the image in a stdole.StdPicture object in a Picturebox.Image ?
7
11600
by: lgbjr | last post by:
Hello All, I¡¯m using a context menu associated with some pictureboxes to provide copy/paste functionality. Copying the image to the clipboard was easy. But pasting an image from the clipboard...
15
5301
by: David Lozzi | last post by:
Howdy, I have a function that uploads an image and that works great. I love ..Nets built in upload, so much easier than 3rd party uploaders! Now I am making a public function that will take the...
4
2544
by: John Swan | last post by:
Hello. I'm trying to create a simple program that amongst other things creates a thumbnail of an image (Bitmap) to a set size determined by the user in pixels? The problem is: All of the...
8
10276
by: samadams_2006 | last post by:
I'm trying to find the namespace for stdole.dll Is there a tool out there that will help me do this?
1
6200
by: =?Utf-8?B?WWFlbA==?= | last post by:
Hi, I have problem is with return stdole.IPictureDisp in this method if the computer don't have vs.net installed. I created a com add-in for outlook 2003 in vs.net 2003 c#. if I calling...
0
1836
by: =?Utf-8?B?WWFlbA==?= | last post by:
I created a com add-in for outlook 2003 in vs.net 2003 c#. My problem is with return type stdole.IPictureDisp. if I calling stdole.IPictureDisp Pic =...
1
3778
by: rsteph | last post by:
I bought a book to help me learn to use DirectX with windows programming. It's first trying to walk me through some basic windows programming and graphics before getting into DirectX. I'm trying to...
0
7093
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7287
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7349
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7008
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7467
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5022
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3168
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1521
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
399
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.