UpdateZoneArea Example for Visual Basic
Private Sub Command29_Click()
Dim nRet As Integer
Dim fLeft As Double
Dim fTop As Double
Dim fRight As Double
Dim fBottom As Double
RasterDoc.DrawPersistence = False
nRet = RasterDoc.SelectZoneByPoint (Null, hDC, 0, 100, 100)
If nRet = 0 Then
fLeft = RasterDoc.SelectedZone (0).Left
fTop = RasterDoc.SelectedZone (0).Top
fRight = RasterDoc.SelectedZone (0).Right
fBottom = RasterDoc.SelectedZone (0).Bottom
nRet = RasterDoc.UpdateZoneArea (0, RasterDoc.SelectZoneIndex, fLeft + 10, fTop + 10, fRight + fLeft + 50, fBottom + fTop + 50)
If (nRet = 0) Then
MsgBox ("The selected zone area is updated")
End If
End If
End Sub