使用缺少的指令和程序集引用

编程入门 行业动态 更新时间:2024-10-14 20:22:04
本文介绍了使用缺少的指令和程序集引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想捕获图像,但我收到的错误说: - 找不到类型或命名空间名称''WebcamEventArgs''(你是否错过了程序集引用?) 找不到类型或命名空间名称''WebCam_Capture''(您是否缺少程序集引用?)

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(); } } }

已添加代码块 - OriginalGriff [/ edit]

[edit]Code block added - OriginalGriff[/edit]

推荐答案

验证是否在解决方案文件中正确引用了程序集。 最有可能它存在于某些dll文件中,如WebCam_Capture.dll 以下是步骤: msdn.microsoft/ en-us / library / wkze6zky(v = vs.80).aspx [ ^ ] Validate if you correctly referenced assembly in your solution file. Most likely it resides in some dll file like WebCam_Capture.dll Here are the steps: msdn.microsoft/en-us/library/wkze6zky(v=vs.80).aspx[^]

假设您已添加对网络摄像头DLL文件的引用... 取出行: Assuming you have added the reference to the web cameras DLL file... Take out the line: using webcam_capture;

然后编译你的程序 - 你会收到错误。 转到第一个错误并将光标放在带下划线的第一个单词中红色的。一个小蓝框将出现在单词的开头。将鼠标悬停在框上,会出现一个下拉列表。打开下拉列表,它将有可能解决问题的方法。第一个应该是使用...选择它,它会为你添加using语句。重复此操作直到你的参考文献正确。

Then compile your program - you will get errors. GO to the first error and put the cursor in the first word that is underlined in red. A small blue box will appear at the beginning of the word. Hover the mouse over the box, and a dropdown will appear. Open the drop down, and it will have possible solutions to the problem. The first one should be "using ..." select it and it will add the using statement for you. Repeat this until your references are correct.

你好, 你需要去 sites.google/site/webcamlibrarydotnet/winfrom- and-csharp-sample-code-and-download [ ^ ] 并下载DLLforAddReference.zip,将WebCam_Capture.dll解压缩到项目目录 并将此dll添加到您的参考文件。 并使用webcam_capture更改; 改为使用WebCam_Capture; 那么它应该可以工作。 问候, Thomas。 Hi, you need to go to sites.google/site/webcamlibrarydotnet/winfrom-and-csharp-sample-code-and-download[^] and download DLLforAddReference.zip, extract the WebCam_Capture.dll to your project directory and add this dll to your References. And change using webcam_capture; to using WebCam_Capture; Then it should work. Regards, Thomas.

更多推荐

使用缺少的指令和程序集引用

本文发布于:2023-11-09 04:30:47,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1571409.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:指令   程序

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!