ZoomToSelection Example VB

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