IC Imaging Control .NET

ICImagingControl.ImageAvailable Event

ICImagingControl.ImageAvailable Event

This event is called each time a frame has been copied completely to the internal ring buffer.
Public Event ImageAvailable( ByVal sender As Object, ByVal e As ICImagingControl.ImageAvailableEventArgs )
public event System.EventHandler<ICImagingControl.ImageAvailableEventArgs> ImageAvailable;
Parameter Description

The object in which the event occurred. In this case the appropriate instance of ICImagingControl.


An ImageAvailableEventArgs object containing the index of the buffer for which the event is called.


Before the ImageAvailable event will be fired, ICImagingControl.LiveCaptureContinuous must be set to True, the control must run in live mode and an event sink has to be registered (which is done by Visual Basic).


Inside an event procedure no Windows API functions should be called which cause a SendMessage (i.e. adding text to an edit box) because this may block the application.

While an event procedure is running, no new events are sent, but frames are still copied.

Exceptions that occur in the ImageAvailable event will get lost in the system. Therefore, bugs in the code that cause an exception cannot be recognized. To avoid this, all code in the event handler should be enclosed by a try ... catch block. If you need to display error messages, do not use a message box. Use a "debug trace" instead (e.g. System.Diagnostics.Trace.WriteLine(...) ). This is very important, because otherwise the system may run into a deadlock which will cause the application to hang.


This example implements an event procedure for the ImageAvailable event. In the event procedure an ImageBuffer object is declared, which is used to take the image, for that the event has been called.

See the Displaying Buffers on the ImageAvailable Event example.

See also: ICImagingControl, ICImagingControl.LiveCaptureContinuous

<< ICImagingControl

Get in touch with us

About The Imaging Source

Established in 1990, The Imaging Source is one of the leading manufacturers of industrial cameras, frame grabbers and video converters for production automation, quality assurance, logistics, medicine, science and security.

Our comprehensive range of cameras with USB 3.1, USB 3.0, USB 2.0, GigE interfaces and other innovative machine vision products are renowned for their high quality and ability to meet the performance requirements of demanding applications.

Automated Imaging Association ISO 9001:2015 certified

Contact us