I found this code on the web. but, I got an error about the WebCamera type.
do I need a WebCamera control or .ocx? where can I find it?
Code:Class Form1 Private WithEvents _Camera As WebCamera Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load _Camera = New WebCamera _Camera.StartFeed() End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click _Camera = New WebCamera _Camera.StartFeed() End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click If _Camera.Running Then _Camera.EndFeed() End If End Sub Private Sub _Camera_ImageChanged() Handles _Camera.ImageChanged Me.Text = "Changed at " & Now().ToString Dim NewImage As Image = _Camera.CurrentImage PictureBox1.Image = NewImage NewImage.Dispose(NewImage = Nothing) End Sub End Class




Reply With Quote