AnnEnumerate example for Visual Basic

Note: This topic is for Document/Medical only.

'Please note the following:
'LEADRasterView1 refers to a LEADRasterView control
'Global declarations
Private WithEvents RasterAnn As LEADRasterAnnotation
Private RasterAnnToolbar As LEADRasterAnnToolBar

'In the Form_Load method:
Set RasterAnn = New LEADRasterAnnotation
Set RasterAnnToolbar = New LEADRasterAnnToolBar
RasterAnn.AnnParentRasterView = LEADRasterView1

'This example causes the AnnEnumerate event to get fired for all annotations in the container.
Private Sub AnnEnumerate_Click()
RasterAnn.AnnEnumerate RasterAnn.AnnContainer, ANN_FLAG_RECURSE + ANN_FLAG_NOTTHIS, ""
End Sub

Private Sub RasterAnn_OnAnnEnumerate(ByVal hObject As Long)
MsgBox "Annotation Handle: " & Hex(hObject)
End Sub