This example demonstrates how a contact sheet can be created using various methods to set the image type, caption attributes, backcolor, orientation, dimension, and file type.
Private Sub cmdContactSheet_Click()
Dim iRet, ContactOption As Long
On Error GoTo Set_Error
'Set orientation, backcolor and dimensions
ImgThumbnail1.SetSaveAsBackColor vbRed
ImgThumbnail1.SetSaveAsOrientation Vertical
ImgThumbnail1.SetSaveAsDimensions 200, 200
'Set caption and its properties
ImgThumbnail1.SetSaveAsCaption CaptionWithAnno, "Page # of *"
ImgThumbnail1.SetSaveAsCaptionFont "Courier", 14, vbGreen, 0
'Save the contact sheet as an RGB24 TIF
ImgThumbnail1.SetSaveAsThumbType 6
ContactOption = esiTIFFContactSheet 'Set contact sheet to multipage
'TIFF format
ContactFile = "c:\contact.tif"
iRet = ImgThumbnail1.SaveAs(ContactFile, ContactOption, 1)
'Display the resulting contact sheet
ImgEdit1.Image = ContactFile
ImgEdit1.Display
Exit Sub
Set_Error:
MsgBox Err.Description, , "Set Error"
Exit Sub
End Sub