beautypg.com

Managing the image control – Kofax DOKuStar Validation User Manual

Page 83

background image

DOKuStar Validation for Ascent Capture

Page

79

Managing the Image Control

The behaviour of the image control, like scrolling and zooming, can also be managed by an add-in. The appropriate
service is called

SourceCtrl

service. Like the other services it must first be provided which is done by the lines

Dim sourceCtrlSink As DOKuStarValidationServices.SourceCtrlService

and Set

sourceCtrlSink = dsValApp.Services("SourceCtrl"):

Let us now implement a special behaviour of the image control. We want to use three key combinations to set the
zoom factor to 300, 200 and 100 respectively and an additional one to scroll to the right.

The zoom factor of the image control can be changed using

sourceCtrlSink.Zoom

. Using

sourceCtrlSink.ScrollTo

allows to scroll to a specified position. In our example we use

Control

+

3

,

Control

+

2

and

Control

+

1

to switch to a specified zoom factor and

Control

+

R

for scrolling to the right.