Dynamsoft Home|Product Home

CopyToClipboard Method

Description

Copies the image of a specified index in buffer to clipboard in DIB format.

Syntax

Boolean ObjectName. CopyToClipboard(Short sImageIndex)

Parameters

Short sImageIndex: specifies the index of image in buffer. The index is 0-based. 

Return value

Boolean.

TRUE indicates success. FALSE indicates failure.

When an error occurs and IfThrowException property is TRUE, an exception will be thrown.

When FALSE is returned or an exception is thrown, check ErrorCode property and ErrorString property for error information.

Remarks

CopyToClipboard() makes a copy of the image to the clipboard. If the application does not need the image in Dynamic (Web) TWAIN any more, use CutToClipboard(), which can save memory, especially when the image is large.

The copied image is in DIB format.

See also

CutToClipboard()

Sample   

VB Sample:
Private Sub Twain_OnPostTransfer()
    
    Twain.CopyToClipboard(0)         
    imgShowImage.Picture = Clipboard.GetData(vbCFDIB) 
    Clipboard.Clear
        
End Sub