TWAIN ActiveX/Plug-in Windows/Mac HTTP Control/SDK

OnImageAreaSelected

Description

Fired when mouse selects an area on an image and the value of the MouseShape property is set to FALSE.

Support information

ActiveX Edition Plug-in Edition Mac Edition
Since V5.1 Since V5.1 Not Supported

Syntax

Object_OnImageAreaSelected(Short sImageIndex, Long Left, Long Top, Long Right, Long Bottom)

Remarks

Short sImageIndex >=0. When the value of sImageIndex equals -1, it indicates that mouse is not on any image.

Long Left: the long point number for the left side of the rectangle are the mouse selects.

Long Top: the long point number for the top side of the rectangle are the mouse selects.

Long Right: the long point number for the right side of the rectangle are the mouse selects.

Long Bottom: the long point number for the bottom side of the rectangle are the mouse selects.

See Also

OnMouseClick Event, OnMouseDoubleClick Event, OnMouseRightClick Event, OnMouseMove Event, OnImageAreaDeSelected Event, Crop(), CropToClipboard()

Sample

A JavaScript sample is provided.

<script type="text/javascript" language="javascript">

WebTWAIN = document.getElementById("DynamicWebTwain");

//IE
WebTWAIN.attachEvent('OnImageAreaDeSelected', DynamicWebTwain_OnImageAreaDeselected);
WebTWAIN.attachEvent('OnImageAreaSelected', DynamicWebTwain_OnImageAreaSelected);
WebTWAIN.attachEvent('OnMouseClick', DynamicWebTwain_OnMouseClick);
WebTWAIN.attachEvent('OnMouseDoubleClick', DynamicWebTwain_OnMouseDoubleClick);
WebTWAIN.attachEvent('OnMouseMove', DynamicWebTwain_OnMouseMoveClick);
WebTWAIN.attachEvent('OnMouseRightClick', DynamicWebTwain_OnMouseRightClick);
WebTWAIN.attachEvent('OnPreAllTransfer', DynamicWebTwain_OnPreAllTransfer);
WebTWAIN.attachEvent('OnPreTransfer', DynamicWebTwain_OnPreTransfer);
WebTWAIN.attachEvent('OnPostLoad', DynamicWebTwain_OnPostLoad);
WebTWAIN.attachEvent('OnPostTransfer', DynamicWebTwain_OnPostTransfer);
WebTWAIN.attachEvent('OnPostAllTransfers', DynamicWebTwain_OnPostAllTransfers);
WebTWAIN.attachEvent('OnTopImageInTheViewChanged', DynamicWebTwain_OnTopImageInTheViewChanged);
WebTWAIN.attachEvent('OnTransferCancelled', DynamicWebTwain_OnTransferCancelled);
WebTWAIN.attachEvent('OnInternetTransferPercentage', DynamicWebTwain_OnInternetTransferPercentage);
WebTWAIN.attachEvent('OnInternetTransferPercentageEx', DynamicWebTwain_OnInternetTransferPercentageEx);

//Non-IE
<embed id='DynamicWebTwain' type='Application/DynamicWebTwain-Plugin'
    OnImageAreaDeSelected = 'DynamicWebTwain_OnImageAreaDeselected'
    OnImageAreaSelected = 'DynamicWebTwain_OnImageAreaSelected'
    OnMouseClick = 'DynamicWebTwain_OnMouseClick'
    OnMouseDoubleClick = 'DynamicWebTwain_OnMouseDoubleClick'
    OnMouseMove = 'DynamicWebTwain_OnMouseMove'
    OnMouseRightClick = 'DynamicWebTwain_OnMouseRightClick'
    OnPreAllTransfer = 'DynamicWebTwain_OnPreAllTransfer'
    OnPreTransfer = 'DynamicWebTwain_OnPreTransfer'
    OnPostLoad = 'DynamicWebTwain_OnPostLoad'
    OnPostTransfer = 'DynamicWebTwain_OnPostTransfer'
    OnPostAllTransfers = 'DynamicWebTwain_OnPostAllTransfers'
    OnTopImageInTheViewChanged = 'DynamicWebTwain_OnTopImageInTheViewChanged'
    OnTransferCancelled = 'DynamicWebTwain_OnTransferCancelled'
    OnInternetTransferPercentage = 'DynamicWebTwain_OnInternetTransferPercentage'
    OnInternetTransferPercentageEx = 'DynamicWebTwain_OnInternetTransferPercentageEx'
></embed>
...

function DynamicWebTwain_OnImageAreaDeselected(sImageIndex){
	// Add your code here
}
function DynamicWebTwain_OnImageAreaSelected(sImageIndex, left, top, right, bottom){
	// Add your code here
}
function DynamicWebTwain_OnMouseClick(sImageIndex){
	// Add your code here
}
function DynamicWebTwain_OnMouseDoubleClick(sImageIndex){
	// Add your code here
}
function DynamicWebTwain_OnMouseMoveClick(sImageIndex){
	// Add your code here
}
function DynamicWebTwain_OnMouseRightClick(sImageIndex){
	// Add your code here
}
function DynamicWebTwain_OnPreAllTransfer(){
	// Add your code here
}
function DynamicWebTwain_OnPostLoad(){
	// Add your code here
}
function DynamicWebTwain_OnPostTransfer(){
	// Add your code here
}
function DynamicWebTwain_OnPostAllTransfers(){
	// Add your code here
}
function DynamicWebTwain_OnTopImageInTheViewChanged(sImageIndex){
	// Add your code here
}
function DynamicWebTwain_OnTransferCancelled(sImageIndex, left, top, right, bottom){
	// Add your code here
}
function DynamicWebTwain_OnInternetTransferPercentage(sPercent, pCancel){
	// Add your code here
}
function DynamicWebTwain_OnInternetTransferPercentageEx(sPercent, pCancel){
	// Add your code here
}




TWAIN ActiveX | TWAIN Plug-in | TWAIN Control | TWAIN SDK | Scanner COM
Software Configuration Management | Version Control | Source Control
Copyright © 2012 Dynamsoft Corporation. All Rights Reserved.