Webcam in C# – How to use webcam in C# Projects

One of my friend have recently been asking me for a C# project to control webcam to capture video & photos. Also if you can capture screenshots or screen video from this application. So I come up with an easy solution from him. I work on this c sharp tutorial. It is in Visual Studio 2010. I've used an image & video processing open source library

I believe this Aforge’s dll contains the most comprehensive set of features for controlling webcam. It looks like it covers all about Videos & Images through webcam and it also comes with tons of example projects!. The main benefit of this dll is that this is open source & no annoying messages.’s one awesome feature is that you can also set it up for using CCTV cameras in C#. I was able to use this in my project in Visual Studio 2010.

C# webcam Source Code

Here is an example of this Program. For anyone who is interested, you can find the working code below!

Demo Output

In this output you can see, First I used webcam & then i used it for Screen Capture. (Well screen capturing isnt working well. But i hope you can fix it for yourself. :D)


  • Can be used to capture photos from Webcam
  • Can be used to capture videos from Webcam
  • Can be used to capture screenshots
  • Can be used to capture screen video
  • Can be used to capture from CCTV footage


You can download this Sample application.

Format : Visual Studio 2010
Size : 1MB

8 thoughts on “Webcam in C# – How to use webcam in C# Projects”

  1. Dear All.
    I have issues when using run your app, when I run the app on a visual studio environment is ok, but I run file .exe, it doesn’t connect to the webcam(status of it is connecting).
    Please give me advice about the issue?

Comments are closed.