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 Aforge.net.


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. Aforge.net’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)

Features

  • 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

Download

You can download this Sample application.

Format : Visual Studio 2010
Size : 1MB


Comments

  1. in demo project there is no capture button but in video we can see capture button. can u add your project please ?

Leave a Reply

Your email address will not be published. Required fields are marked *

Sajjad Arif Gul

Hi! I am Sajjad Arif Gul, Software Engineer, Web & Mobile Developer from Karachi Pakistan. I love sharing my knowledge that could possibly help someone’s life in some capacity. Happy Coding.