0
我試圖去通過在 http://bytes.com/topic/net/answers/608057-capturing-video-webcam給出的源代碼,但是當我嘗試在我的項目複製和粘貼其示值誤差說錯誤與視頻捕捉代碼
錯誤1訪問性不一致: 參數類型 「View_Box.WebCamCapture.WebcamEventArgs」 比代表不太容易接近 「View_Box.WebCamCapture.WebCamEventHandler」
究竟是我的C問題頌?
下面是我正在編譯的代碼片段,並且我還突出顯示了錯誤發生的位置的起始箭頭和結束箭頭。
[System.Drawing.ToolboxBitmap(typeof(WebCamCapture), "CAMERA.ICO")] // toolbox bitmap
[Designer("Sytem.Windows.Forms.Design.ParentControlDesigner,System.Design", typeof(System.ComponentModel.Design.IDesigner))] // make composite
public class WebCamCapture : System.Windows.Forms.UserControl
{
private System.ComponentModel.IContainer components;
private System.Windows.Forms.Timer timer1;
// property variables
private int m_TimeToCapture_milliseconds = 100;
private int m_Width = 320;
private int m_Height = 240;
private int mCapHwnd;
private ulong m_FrameNumber = 0;
private class WebcamEventArgs
{
public Image WebCamImage;
}
// global variables to make the video capture go faster
private WebCamCapture.WebcamEventArgs x = new WebCamCapture.WebcamEventArgs();
private IDataObject tempObj;
private System.Drawing.Image tempImg;
private bool bStopped = true;
// event delegate
-->Error in the below line
public delegate void WebCamEventHandler(object source, WebCamCapture.WebcamEventArgs e);
<--
// fired when a new image is captured
public event WebCamEventHandler ImageCaptured;
#region API Declarations
#region Camera API Constants