GetAnnotationMarkCount Example VB

This example shows some methods for determining the number and types of annotations on a page.

Private Sub cmdMarkCount_Click()
    Dim intMarkCount As Integer
    
    'Returns a count of all marks on the page displayed.
    intMarkCount = ImgEdit1.GetAnnotationMarkCount
    
    'Returns a count of all marks in the annotation group called
    'accounting.
    intMarkCount = ImgEdit1.GetAnnotationMarkCount("accounting")
    
    'Returns a count of all OCR regions.
    intMarkCount = ImgEdit1.GetAnnotationMarkCount(, wiOcrRegion)
    
    'Returns a count of all text annotation marks in the
    'annotation group called "accounting".
    intMarkCount = ImgEdit1.GetAnnotationMarkCount("accounting", wiText)
End Sub