Domanda

I get this error:

Error 1 'Public Event NewFrame(sender As Object, eventArgs As
AForge.Video.NewFrameEventArgs)' is an event, and cannot be called directly.
Use a 'RaiseEvent' statement to raise an event.
C:\Users\Jonathan\Documents\Visual Studio 2010\Projects\Stream\Stream\Form1.vb
9 9 Stream

My code is:

Enter image description here

How I can solve this?

È stato utile?

Soluzione

Not a VB buff, but I don't think that how you subscribe to events in VB. Try:

Dim stream As New MJPEGStream("...")
AddHandler stream.NewFrame, AddressOf Me.video_NewFrame
...
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top