网络摄像头在一个主要形式 [英] Webcam in a mainform

查看:86
本文介绍了网络摄像头在一个主要形式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

基本上我需要将一个网络摄像头插入到一个主窗体中而不会破坏我最初放入的代码(它在VB中)。



更多细节:

我的mainform有一个文本框,显示来自usb传感器的实时读数。



我已经在网上找到了网络摄像头的解决方案,但我的问题是我不知道如何将网络摄像头代码添加到表单而不会破坏传感器的代码!



有更简单或更好的方法吗?

我需要在表格中安装网络摄像头!



谢谢,詹姆斯。

解决方案

请试试这篇文章@ http://sites.google.com/site/webcamlibrarydotnet/winfrom-and-csharp-sample-code-and-download [ ^ ]


不是解决方案,但我现在从我的主表单中打开网络摄像头作为外部程序。



基本上我发布并安装了网络摄像头程序并使用按钮机智调用它h以下代码:



 Private Sub cbActivateCamera_CheckedChanged(ByVal sender As System.Object,ByVal e As System.EventArgs)
System .Diagnostics.Process.Start(C:\ ---将程序目的地输入其exe文件 - )
End Sub





以下代码使用关闭按钮关闭外部程序:



 Private Sub cbClos​​eCamera_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim pProcess()As Process = System.Diagnostics.Process.GetProcessesByName( - program name ---)
For each p As Process in pProcess
p.Kill()
下一个
结束子





再次这不是我的问题的解决方案暂时解决,所以我仍然对所有建议或想法持开放态度。



谢谢,

James。

我建​​议使用EmguCV ........

Quote:



[ ^ ]





[ ^ ]





[ ^ ]







参考这些文章


Hi All,
Basically I need to insert a webcam into a mainform without it upsetting the code I have originally put in it(It's in VB).

More Detail:
My mainform has a textbox which displays realtime readings from a usb loadcell.

I have found solutions for webcams online but my problem is i don't know how to add the webcam code to the form without it upsetting the code for the loadcell!

Is there an easier or better way of doing this?
I would need to have the webcam IN the form!

Thanks, james.

解决方案

Please try this article @ http://sites.google.com/site/webcamlibrarydotnet/winfrom-and-csharp-sample-code-and-download[^]


Not a solution, but I am now opening the webcam as an external program from my main form.

Basically I published and installed the webcam program and call it using a button with the following code:

Private Sub cbActivateCamera_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
        System.Diagnostics.Process.Start("C:\ ---enter program destination to its exe file-- ")
    End Sub



The following code closes the external program using the Close button:

Private Sub cbCloseCamera_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
        Dim pProcess() As Process = System.Diagnostics.Process.GetProcessesByName(" --program name--- ")
        For Each p As Process In pProcess
            p.Kill()
        Next
    End Sub



Again this is not a solution to my problem rather a temporary fix so i'm still open to all suggestions or ideas.

Thanks,
James.


i'l suggest to use EmguCV........

Quote:


[^]


[^]


[^]



refer these articles


这篇关于网络摄像头在一个主要形式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆