This example shows how to set the highlight color for selected thumbnail boxes using the Common Color dialog.
Private Sub mnuHighLightColor_Click()
On Error GoTo ErrColor
'Thumbnails must be selected programmatically
ImgThumbnail1.AutoSelect = False
'Properties for the Common color dialog
CommonDialog1.CancelError = True
CommonDialog1.Flags = cdlCCRGBInit Or cdlCCPreventFullOpen
CommonDialog1.ShowColor
ImgThumbnail1.HighlightColor = CommonDialog1.Color
'Show first thumb highlighted
If ImgThumbnail1.ThumbCount > 0 Then ImgThumbnail1.ThumbSelected(1) = True
ImgThumbnail1.HighlightSelectedThumbs = True
Exit Sub
ErrColor:
MsgBox Err.Description, , "Set Colors"
Exit Sub
End Sub