本文介绍了访问C3中的代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



对不起,这里有一个新的问题。希望没有人介意它可能是一个简单的问题?



我搜索谷歌并且无法在任何地方找到答案,但我可能会再次查看错误的内容....



我的申请表中有以下代码:

Hi All,

Sorry a newbiw question here. Hope no one minds as its probably a simple question?.

I have searched Google and cant find the answer anywhere, but then again I maybe looking at the wrong things ....

I have the following code in my Application:

void cam_NewFrame(object sender, NewFrameEventArgs eventArgs)
{
    Bitmap bit = (Bitmap)eventArgs.Frame.Clone();
    picWebCam.Image = bit;
}



我需要从''void cam_NewFrame''调用''bit.dispose();'',但是从内部:


I need to call ''bit.dispose();'' from ''void cam_NewFrame'' but from within:

private void btnStop_Click(object sender, EventArgs e)
{
    cam.Stop();
    bit.dispose(); // Need to add in here
}



显然这不是在另一个班级工作(?)?



如何从我的btnStop调用bit.dispose?



非常感谢

SJG


Obviously this isnt working as its in a different class(?)?

How can i call bit.dispose from my btnStop?

Many Thanks
SJG

推荐答案


这篇关于访问C3中的代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-27 00:12