views:

65

answers:

2

Hello everybody.

I'm using DirectShowNet.dll to grab a photo of my web camera.

Anytime my camera initializes it first shows me this screen. Where can I turn it off?

http://www.goat-it.com/!tino/screen.jpg

Thank you

+1  A: 

You could use the Win32 FindWindow command to find it and then send a WM_COMMAND to press the OK button?

Edit: Well if you want to do it the more "proper" way (Though my experience is from the C++ end, but I assume its much the same) you may want to locate the video capture filter. Once you've located that you can query interface it to see if you can access its IPropertyPage (IIRC) interface. If you can then you should just be able to call Deactivate.

Alas I don't have access to a webcam at the moment so I can't check on how exactly to do this ...

Are you using the ICaptureGraphBuilder? If so it may well be worth learning how to enumerate all the devices and attach them together yourself. It will give you a MUCH better understanding of whats going on :)

Goz
That sounds to me more like a hack...I will surely try it, but, I'm interested in what is triggering that window to show?Is it DirectShow's window or internal Windows property window?It pops out no matter what camera I connect to it, so it'snot related to a specific webcam.
Hybryd
+1  A: 

Looks like your code is pulling up the prop pages for your camera. I have only been able to get this property page to show if I explicitly write code to do it. How are you getting the image? Graph -> CaptureGraphBuilder2 + SampleGrabber -> SampleGrabberCB?

Jeremiah Morrill
Yes, this is just the way I do it...I'm new to DirectShow, so I've downloaded some sample codefor grabbing images from camera. I don't have a very goodunderstanding how it works.How do you explicitly write code to show this screen?
Hybryd
Here, I do it in my open source project here: http://wpfmediakit.codeplex.com/SourceControl/changeset/view/40116#25940Look at the ShowCapturePropertyPages(...) method and follow to PropertyPageHelper.cs
Jeremiah Morrill
Thank you very much! It helped :)
Hybryd