AddAnnotationGroup Example VB

This example adds an annotation group, sets the annotation type, sets the background color of the annotation, and then draws the mark. (Annotation groups are not actually created until a mark is drawn in the group.)

Private Sub cmdAddGroup_Click()

    ImgEdit1.AddAnnotationGroup "Accounting Dept"
    ImgEdit1.AnnotationType = wiTextAttachment  '10
    ImgEdit1.AnnotationBackColor = vbYellow
    ImgEdit1.Draw 10, 10, 150, 100
    
    'The user must manually enter the text on the attachment
End Sub