Imports System Imports System.IO Imports System.Text Imports WebCam_Capture Imports System.Collections.Generic Namespace CSharpWebCam 'Design by Dharma Iyer Class WebCam Private webcam As WebCamCapture Private _FrameImage As System.Windows.Forms.PictureBox Private FrameNumber As Integer = 30 Public Overloads Sub InitializeWebCam(ByRef ImageControl As System.Windows.Forms.PictureBox) webcam = New WebCamCapture webcam.TimeToCapture_milliseconds = FrameNumber AddHandler webcam.ImageCaptured, AddressOf Me.webcam_ImageCaptured _FrameImage = ImageControl End Sub Private Sub webcam_ImageCaptured(ByVal source As Object, ByVal e As WebcamEventArgs) _FrameImage.Image = e.WebCamImage End Sub Public Sub Start() webcam.TimeToCapture_milliseconds = FrameNumber webcam.Start(0) End Sub Public Sub Stop() webcam.Stop() End Sub Public Sub Continue() ' change the capture time frame webcam.TimeToCapture_milliseconds = FrameNumber ' resume the video capture from the stop webcam.Start(Me.webcam.FrameNumber) End Sub Public Sub ResolutionSetting() webcam.Config() End Sub Public Sub AdvanceSetting() webcam.Config2() End Sub Friend Overloads Sub InitializeWebCam(ByVal imgCam As System.Windows.Forms.PictureBox) Throw New NotImplementedException End Sub End Class End Namespace ---------------------------------------------------------- but there is error in this code Error 1 Public Overloads Sub InitializeWebCam(ByRef ImageControl As System.Windows.Forms.PictureBox) webcam = New WebCamCapture webcam.TimeToCapture_milliseconds = FrameNumber AddHandler webcam.ImageCaptured, AddressOf Me.webcam_ImageCaptured _FrameImage = ImageControl End Sub 'Public Overloads Sub InitializeWebCam(ByRef ImageControl As System.Windows.Forms.PictureBox)' and 'Friend Overloads Sub InitializeWebCam(imgCam As System.Windows.Forms.PictureBox)' cannot overload each other because they differ only by parameters declared 'ByRef' or 'ByVal'. ------------------------------------------------------ and there is another error Public Sub Continue() ' change the capture time frame webcam.TimeToCapture_milliseconds = FrameNumber ' resume the video capture from the stop webcam.Start(Me.webcam.FrameNumber) End Sub Error 2 Keyword is not valid as an identifier. C:\Documents and Settings\MUHAMMAD IRFAN\Desktop\ClassLibrary1\ClassLibrary1\Class1.vb 34 20 ClassLibrary1
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)