Click here to Skip to main content
12,399,799 members (46,790 online)

using a missing directive and assembly reference

sandeep bishnoi 29 asked:

Open original thread
i want to capture the image but i am getting the error says:-The type or namespace name 'WebcamEventArgs' could not be found(are you missing an assembly reference?)
The type or namespace name 'WebCam_Capture' could not be found(are you missing an assembly reference?)


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.IO;
using System.Runtime.InteropServices;
using webcam_capture;
 
namespace CSharpWebCam
{
    class WebCam
    {
       
        private  WebCamCapture webcam;
        private System.Windows.Forms.PictureBox _FrameImage;
        private int FrameNumber = 30;
        public void InitializeWebCam(ref System.Windows.Forms.PictureBox ImageControl)
        {
            webcam = new WebCamCapture();
            webcam.FrameNumber = ((ulong)(0ul));
            webcam.TimeToCapture_milliseconds = FrameNumber;
            webcam.ImageCaptured += new WebCamCapture.WebCamEventHandler(webcam_ImageCaptured);
            _FrameImage = ImageControl;
        }
 
        void webcam_ImageCaptured(object source,WebCam_Capture.WebcamEventArgs e)
        {
            _FrameImage.Image = e.WebCamImage;
        }
 
        public void Start()
        {
            webcam.TimeToCapture_milliseconds = FrameNumber;
            webcam.Start(0);
        }
 
        public void Stop()
        {
            webcam.Stop();
        }
 
        public void Continue()
        {
            // change the capture time frame
            webcam.TimeToCapture_milliseconds = FrameNumber;
 
            // resume the video capture from the stop
            webcam.Start(this.webcam.FrameNumber);
        }
 
        public void ResolutionSetting()
        {
            webcam.Config();
        }
 
        public void AdvanceSetting()
        {
            webcam.Config2();
        }
 

        internal void InitializeWebCam(System.Windows.Forms.PictureBox imgCam)
        {
            throw new NotImplementedException();
        }
    }
}

[edit]Code block added - OriginalGriff[/edit]
Tags: C#

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the The Code Project Open License (CPOL).



Advertise | Privacy | Mobile
Web02 | 2.8.160721.1 | Last Updated 26 Mar 2009
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100