This example draws a selection rectangle on an image and zooms in on the area bound by the rectangle.
Private Sub cmdZoomSelect_Click()
'Enable rectangle drawing
ImgEdit1.SelectionRectangle = True
'Draw rectangle
ImgEdit1.DrawSelectionRect 150, 200, 400, 400
ImgEdit1.ZoomToSelection
End Sub
Private Sub Form_Initialize()
'Specific zoom options
ZoomIndex(0) = 125
ZoomIndex(1) = 25
ZoomIndex(2) = 100
'Set Thumbnail option
ThumOpt = 1
'Set the boundary of the file type
LowLimit = 0
MaxLimit = 4
'Set the size of the selection area
x = 0
y = 0
z = 410
w = 310
End Sub