Thanks - I'll take a look!
Main Topics
Browse All TopicsHi experts,
I need to incorporate a window into an application that I'm writing that will capture an image from a Webcam connected to the computer running my application.
This should be possible via the DirectX/DirectDraw API or maybe even GDI within the .Net framework.
Please advise me on what is currently the best approach to take and how to get started with it.
I'm using Microsoft .Net Framework 3.5 for my application. If possible I'd like to use the same to get the image captured.
Thanks
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Using the example attached (I don't remember where I get it) I got create a xaml webcam viewer control like this (this code don't comple, is a part of a real application):
Probably code snipet is not the best example, but I get my aplication to work reading demo example programming with windows forms attached.
After a while testing and researching diferents options to capture a webcam when I had to do this the application attached was the best way to understand all of this world, for a begginer like me in that moment. It have a lot of option to configure webcam, get webcams in the system and more things.
Kind Regards
I have found the webpage where I got it because I can't attach a rar file with entire solution
http://www.codeproject.com
I've recreated this solution in VS2008, Windows 7 x64. The app during loading is struck in an infinite loop at this point (it appears that it never hits OnGraphNotify()):
/// <summary> override window fn to handle graph events. </summary>
protected override void WndProc(ref Message m)
{
if (m.Msg == WM_GRAPHNOTIFY)
{
if (mediaEvt != null)
OnGraphNotify();
return;
}
base.WndProc(ref m);
}
Business Accounts
Answer for Membership
by: knight00Posted on 2009-05-31 at 12:28:56ID: 24513613
This is one of the easier way to accomplish what you need
hsch/archi ve/2007/11 /19/c-webc am- user-co ntrol-sour ce.aspx
http://blogs.msdn.com/mark