|
-
Apr 8th, 2009, 05:26 AM
#1
Thread Starter
Addicted Member
[RESOLVED] Type define problem
When I Write the line below, I get an error: Type 'WebCamera' is not defined.
Private WithEvents _Camera As WebCamera
What is the problem?
-
Apr 8th, 2009, 05:39 AM
#2
Re: Type define problem
The problem is that WebCamera is not a variable type, like Integer or String or something along those lines, that VB recognizes. It doesn't know what you mean.
What do you mean?
I have no clue what WebCamera, as a type, means either.
-
Apr 8th, 2009, 05:44 AM
#3
Thread Starter
Addicted Member
Re: Type define problem
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
-
Apr 8th, 2009, 05:45 AM
#4
Re: Type define problem
I have no idea.
Where ever you found it should supply the answers to these questions.
Where did you find it?
-
Apr 8th, 2009, 05:59 AM
#5
Thread Starter
Addicted Member
Re: Type define problem
In this link (#6 thread):
http://www.vbforums.com/showthread.php?t=564246
Is it wrong? Do I need to find something else?
-
Apr 8th, 2009, 06:02 AM
#6
Re: Type define problem
Hey,
If I am right, then he is using the Camera Class which Pino made here:
http://www.vbforums.com/showthread.p...66#post2048466
And which is referenced in this thread:
http://www.vbforums.com/showthread.php?p=3488608
Gary
-
Apr 8th, 2009, 06:12 AM
#7
Re: Type define problem
 Originally Posted by assafey
It isn't Post #6 that you need, it is what is in Post #5
-
Apr 8th, 2009, 06:25 AM
#8
Re: Type define problem
Hi,
Here's an example how to use a webcam with DirectShow.Net with codes and explanation.
-
Apr 8th, 2009, 07:34 AM
#9
Thread Starter
Addicted Member
Re: Type define problem
It isn't Post #6 that you need, it is what is in Post #5
Hack I have the same error problem here:
Code:
Private myCam As iCam
Type 'iCam' is not defined
-
Apr 8th, 2009, 08:49 AM
#10
Re: Type define problem
assafey, have you had a look at the sample project that Pino has included in his post? I think that would make things clearer.
Have you included the iCam class in your project and included any necessary "Imports" to get it to work?
Gary
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|