Removes the image of a specified index in buffer.
Namespace: Dynamsoft.DotNet.TWAINAssembly: DynamicDotNetTWAIN (in DynamicDotNetTWAIN.dll) Version: 3.0.0.0 (3.0.0.0)
Syntax
| C# |
|---|
public bool RemoveImage( short sImageIndexToBeDeleted ) |
| Visual Basic |
|---|
Public Function RemoveImage ( _ sImageIndexToBeDeleted As Short _ ) As Boolean |
Parameters
- sImageIndexToBeDeleted
- Type: System..::..Int16
Specifies the index of image to be deleted in buffer. The index is 0-based.
Return Value
True indicates success. False indicates failure.
Remarks
If the CurrentImageIndexInBuffer is MaxImagesInBuffer -1, the image with index of CurrentImageIndexInBuffer will be removed,
and the CurrentImageIndexInBuffer will be MaxImagesInBuffer -2; No image is highlighted in the control.
If the CurrentImageIndexInBuffer is 0, the first image will be removed; and CurrentImageIndexInBuffer will still be 0.
The indices of images will be changed accordingly. The image with index 0 will be selected.(This is also the case when the
index is set to another value except MaxImagesInBuffer -1)
Exceptions
| Exception | Condition |
|---|---|
| Dynamsoft.DotNet.TWAIN..::..TwainException | When an error occurs and IfThrowException property is true, an exception will be thrown. When IfThrowException property is false, please check ErrorCode and ErrorString. |