RegisterEvent()

Description

Add an event listener to a built-in Dynamic Web TWAIN event.

Syntax

.RegisterEvent(eventName, evt)

Parameters

stringeventName: the name of a built-in event. Currently the supported events are:
OnBitmapChanged
OnGetFilePath
OnImageAreaDeSelected
OnImageAreaSelected
OnInternetTransferPercentage
OnMouseClick
OnMouseDoubleClick
OnMouseMove
OnMouseRightClick
OnPostAllTransfers
OnPostLoad
OnPostTransfer
OnPreAllTransfers
OnPreTransfer
OnSourceUIClose
OnTopImageInTheViewChanged
OnWebTwainReady

<function> optional evt: a <function> as the event listener.

Return value

bool

true indicates success. false indicates failure.

When false is returned, check ErrorCode or ErrorString for error information.

Remarks

For the same event, the 2nd listener will override the 1st one. So there is always just one event listener for one event.

See also

UnregisterEvent

Is this page helpful?

Leave a Reply

Your email address will not be published.