RgnChange example for Visual Basic
The following code for the RasterView RgnChange event updates a text box using the GetRgnArea method. You can test it by adding a text box for the lesson described in Outlining, Dragging, and Pasting a Region.
Private Sub LEADRasterView1_RgnChange()
Dim MyText As String
MyText = "Number of pixels in region: "
MyText = MyText + CStr(LEADRasterView1.Raster.GetRgnArea)
MsgBox MyText
End Sub