Zoom-In / Zoom-Out Not working Properly (Document Imaging SDK)

  Imaging Toolkit

When I display an image and then press the zoom-in or zoom-out Buttons, nothing happens. If I select an area of the image and it Zooms into that
area, I find the zoom-in or zoom-out now work But sometimes in an unpredictable way.

The problem was that the scale mode wasn’t set properly. If you want to use ZoomIn or ZoomOut methods you have to set the scale mode to tifsmNoScale as the following:

BlackIce1.ScaleMode = tifsmNoScale

The code is the following:

‘——– Load & Display a Tiff Image into BlackIce1 control
Private Sub Form_Load()
‘ BiDisp control settings
BlackIce1.Zoom = tif2sEnable
BlackIce1.ZoomWithKeyboard = tif2sDisable
BlackIce1.ScrollBars = tifsbBoth
‘ you have to set scale mode to tifsmNoScale to use ZoomIn and ZoomOut
BlackIce1.ScaleMode = tifsmNoScale

Dim fileName As String ‘ name of the tiff file
Dim hdib As Long ‘ hanle of the DIB
Dim BiTiffobj As Object ‘ dinamic allocated BiTiff object

‘ load tiff file
fileName = “C:\BankTest.tif”
Set BiTiffobj = CreateObject(“BITIFF.BITiffCtrl.1”)
hdib = BiTiffobj.LoadTiffIntoDIB(fileName, 0, 0)
Set BiTiffobj = Nothing

‘ test file existing
If hdib = 0 Then
MsgBox (“File does not exist!”)
‘ set the content of the BiDisp control
BlackIce1.hdib = hdib
End If
End Sub

‘—— Zoom In Button ————————————
Private Sub ZoomINbtn_Click()
End Sub

‘—— Zoom Out Button ————————————
Private Sub ZoomOUTbtn_Click()
End Sub

Technical Support Team