| Visual Basic (Declaration) | |
|---|---|
Public Event ImageAcquired() As ImageAcquiredEventHandler | |
| Visual Basic (Usage) | Copy Code |
|---|---|
| |
| C# | |
|---|---|
public event ImageAcquiredEventHandler ImageAcquired() | |
| Managed Extensions for C++ | |
|---|---|
public: __event ImageAcquiredEventHandler* ImageAcquired(); | |
| C++/CLI | |
|---|---|
public: event ImageAcquiredEventHandler^ ImageAcquired(); | |
The event handler receives an argument of type AcquireEventArgs containing data related to this event. The following AcquireEventArgs properties provide information specific to this event.
| Property | Description |
|---|---|
| CancelPending | Gets or sets a value which determines if the pending images will be acquired. |
| EndOfJob | Gets a value indicating whether this is the last image in a batch job. |
| ExtendedImageInfo | Gets a Hashtable containing extended image information retrieved from the device for this acquisition. |
| FileName | Gets the filename of the image when acquired to file. |
| Image | Gets the Bitmap image acquired. |
| PendingImages | Gets the number of images waiting to be acquired. |
The example below loads the image or filename passed by the AcquireEventArgs into a PictureBox.
| C# | Copy Code |
|---|---|
private void acquisition_ImageAcquired(object sender, Atalasoft.Twain.AcquireEventArgs e) | |
| Visual Basic | Copy Code |
|---|---|
Private Sub acquisition_ImageAcquired(ByVal sender As Object, ByVal e As Atalasoft.Twain.AcquireEventArgs) | |
All pending image acquisitions can be cancelled by setting the CancelPending property of the AcquireEventArgs to true.
To transfer the returned Bitmap to an AtalaImage when integrating with DotImage, use the AtalaImage.FromBitmap method.
When scanning multiple pages at once, this method can be used to compose a multipage image by invoking the Images.Add method of the Workspace object in DotImage.
Requirements
Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family