CreateZoomView Example for Visual Basic

Dim RasterIO As New LEADRasterIO
Dim nRet As Integer
Dim ZoomView As New LEADRasterZoomView

 ‘Unlock support—substitute the unlock support key for L_KEY_DOCUMENT
LEADRasterView1.Raster.UnlockSupport L_SUPPORT_DOCUMENT, L_KEY_DOCUMENT
RasterIO.Load LEADRasterView1.Raster, "c:\image1.cmp", 0, 0, 1

ZoomView.SrcLeft = 0
ZoomView.SrcTop = 0
ZoomView.SrcWidth = 100*100
ZoomView.SrcHeight = 100*100

ZoomView.DstTop = 100*100
ZoomView.DstLeft = 100*100
ZoomView.DstWidth = 200*100
ZoomView.DstHeight = 200*100

ZoomView.BorderColor = RGB(255, 0, 0)
ZoomView.BorderStyle = ZOOM_VIEW_BORDERSTYLE_ROUNDED
ZoomView.PenStyle = PEN_STYLE_DASHDOTDOT

ZoomView.SrcBorderColor = RGB(255, 0, 0)
ZoomView.SrcBorderStyle = SOURCE_BORDERSTYLE_SIMPLE
ZoomView.SrcPenStyle = PEN_STYLE_DOT

ZoomView.EnableCallouts = True
ZoomView.CalloutColor = RGB(0, 0, 255)
ZoomView.CalloutPenStyle = PEN_STYLE_DASH

ZoomView.ZoomFactor = 200
ZoomView.Enabled = True
ZoomView.ForceDst = True
ZoomView.AnnContainer = 0
LEADRasterView1.EnableHiliteZoomView = True

nRet = LEADRasterView1.CreateZoomView(ZoomView)