FrameAcquiredX
Top  Previous  Next

Description

This event is fired each time a frame has been acquired, decoded and processed. Unlike FrameAcquired event it is fired from a processing thread providing a higher efficiency. May not work in certain containers.

Syntax


[VB]
Private Sub objActiveUSB_FrameAcquiredX()


[C/C++]
HRESULT Fire_FrameAcquiredX();

Parameters
 
None  

Return Values


S_OK  
Success  
E_FAIL  
Failure.  


Example


This VB.NET example uses the FrameAcquiredX event to access and display a pixel value in real time:

Public
 Class
 Form1
 
    Delegate
 Sub UpdateFPSLabelCallback([text] As String)
 
    Private
 Sub AxActiveUSB1_FrameAcquiredX(sender As Object, e As System.EventArgsHandles AxActiveUSB1.FrameAcquiredX
        UpdateLabel(Format(AxActiveUSB1.GetPixel(16, 32)))
    End
 Sub
 
    Private
 Sub UpdateLabel(ByVal [text] As String)
        If
 Me.Label1.InvokeRequired Then
            Dim
 d As New UpdateLabelCallback(AddressOf UpdateLabel)
            Me
.Invoke(d, New Object() {[text]})
        Else

            Me
.Label1.Text = [text]
        End
 If
    End
 Sub
 
End
 Class


Remarks


This event is provided for applications that can process events fired from a processing thread (VB.NET, C#, C++). For applications created in VB6, VBA, Delphi and Matlab use FrameAcquired event instead.

One of the following conditions must be met, before the FrameAcquiredX event will be fired:
The Acquire property has been set to TRUE  
The Grab method has been called.