I am trying to write a program in Visual Studio 2008 that will access a webcam, show a preview on the screen and then save a still snapshot (.jpg) when the button is pushed. Later I am going to integrate it with a database, but I shouldn't have a problem with that part. After doing some research, it looks like DirectShow is the BEST BET, because WIA didn't work on the camera I had (and I'm not sure it will continue to work into the future). Preferably, I need my solution to work from Windows XP to Windows 7. I have never used DirectShow (or similar) before. One problem I am running into is that most of the code is written in C#, which I have never learned. I found a DirectShow.Net library that also uses vb.net, so that is helpful, but I am still having problems. The following code is taken from the samples in the library, and works, but I want to alter it somewhat and can't quite get it to work. The code right now saves the camera capture to a file. I can rem out the "capGraph.SetOutputFileName" line, the video will just launch into its own window, but I don't how to control that. Basically, I would like to know how to do two things:
How do I get DirectShow to display in a control on a form that I specify (picturebox?)?
Can I then get a snapshot of that video when the user clicks a button (it can pause the video, or whatever, because at that point I don't need the preview to resume, at least not for a number of seconds.)
Thanks a lot, and sorry if some of this is not phrased very well. I am self-taught, and have done a lot in vba and php, but this is a little beyond my experience.