AcquireImage Method
Syntax
CWIMAQ.AcquireImage
Return Type
This method returns 0 on success, a negative number on an error, and a positive number on a warning.
Purpose
Runs an acquisition synchronously.
Remarks
When using the CWIMAQ control in a container that has events, you do not have to call this method. Instead, run the acquisition asynchronously by calling the Start method. As images are acquired, the CWIMAQ control generates the AcquiredImage event.
If this method is called with the AcquisitionType set to cwimaqAcquisitionOneShot, the CWIMAQ control will acquire the specified number of images once, and then stop. To perform a continuous acquisition use the asynchronous Start and Stop methods.
Example
Private Sub Run_Click() ' Acquire an image synchronously and display it ' Attach the viewer to the first item of the Images ' collection CWIMAQViewer1.Attach CWIMAQ1.Images.Item(1) ' Perform the acquisition CWIMAQ1.AcquireImage End Sub