This example demonstrates how a caption might be set. In this case, a custom caption along with a graphic, indicating that a page contains annotations, is applied to the thumbnails. The following characters are mapped to the properties: @ indicates current thumbnail, ? indicates the total number of thumbnails, and $ indicates the file name.
Private Sub cmdCaption_Click()
On Error GoTo Err_Handle
ImgThumbnail1.ThumbCaptionStyle = CaptionWithAnno 'Display a custom caption
ImgThumbnail1.ThumbCaption = "Pg @/? in $" 'Ex. Pg 1/4 in test.tif
ImgThumbnail1.Refresh
Exit Sub
Err_Handle:
MsgBox Err.Description, , "Caption error"
Exit Sub
End Sub