tags:

views:

409

answers:

3

My webcam has a button, with which you take a photo of current frame when using it's original software what came with it when I bought it.

Is there any way to use that button to take photos in my program. I would be using C#.

I was thinking of using Windows Image Acquisition (WIA) or avicap32 for using webcam in my software.

Any help would be appreciated. Where do I start?

EDIT:

I see that you didn't understand me. I need to know if my phisycal camera button is pressed. I am using DigiMicro 1.3 camera (Manufacturer is DNT), which isn't really a webcam but a USB microscope, but it behaves like a webcam.

A: 

This Coding4Fun post guides you through pretty much everything you need to do to get started using WIA, including adding the reference to a project, displaying the select a device dialog, and of course actually taking the picture :P.

Coding4Fun - Look at me! Windows Image Acquisition

In this threat I'm particulary interested in using a physical button on my camera for taking photos, not using my camera in C# app. But thanks anyway ;)
Hybryd
A: 

I suggest that you take a look at the DirectShow.NET library. It has great functionality for capturing images/videos off connected devices. It also comes with several samples to get you started quickly.

Qua
In this thread I'm asking on how to use a physical button on my camera, not using the camera in my C# project. Tnx anyway ;)
Hybryd
A: 

Does the camera actually require that the software be running when you press the button? I know some webcams implement this feature at the driver level. If that's the case, I don't think there's much you can do without interacting directly with the USB port, which would be incredibly difficult and likely not worth the trouble. I can't find any technical documentation on the vendor's website with that kind of information.

The "MicroCapture" software doesn't come with any DLLs that have exported functions, so P/Invoking doesn't appear to be an option. Unfortunately, I can't get the driver installed, so I can't check if it comes with any P/Invoke-able DLLs.

Sorry, but since there's no standard interface for that kind of functionality and the vendor doesn't provide any specific information on it, I don't think this is possible. I would suggest contacting DNT directly about it. They may have some component that will do what you need.

David Brown
Thank you very much for your effort. I will contact DNT for further info on this.
Hybryd