AnnEnumerateHandle example for Visual Basic
Private Sub ExampleAnnEnumerateHandles(hObject As Long)
RasterAnn.EnableFireEnumerateHandleEvent = True
RasterAnn.AnnEnumerateHandle hObject
End Sub
Private Sub RasterAnn_OnEnumerateHandle(ByVal hObject As Long, ByVal AnnHandleInfo As LTANNLib.ILEADRasterAnnHandleInfo)
AnnHandleInfo.EnableVisible = True
If AnnHandleInfo.Type = ANN_HANDLE_TYPE_DEFAULT_HANDLE Then
AnnHandleInfo.Shape = ANN_HANDLE_SHAPE_SQUARE
AnnHandleInfo.FillColor = RGB(0, 0, 255)
AnnHandleInfo.PenColor = RGB(0, 255, 0)
AnnHandleInfo.ID = 100
AnnHandleInfo.ClientX = 20
AnnHandleInfo.ClientY = 20
AnnHandleInfo.ContainerX = 100
AnnHandleInfo.ContainerY = 100
Else
AnnHandleInfo.Shape = ANN_HANDLE_SHAPE_CIRCLE
AnnHandleInfo.FillColor = RGB(0, 255, 0)
AnnHandleInfo.PenColor = RGB(0, 0, 255)
AnnHandleInfo.ID = 50
AnnHandleInfo.ClientX = 10
AnnHandleInfo.ClientY = 10
AnnHandleInfo.ContainerX = 50
AnnHandleInfo.ContainerY = 50
End If
MsgBox "The handle with index = " + Str(AnnHandleInfo.Index) + "was updated"
MsgBox "The Total number of handles = " + Str(AnnHandleInfo.TotalHandles)
RasterAnn.StopFireEnumerateHandleEvent = False
End Sub