This example uses the GetSelectedAnnotationBackColor method, the SetSelectedAnnotationBackColor method, and the Microsoft common dialog box to change the background color of a selected text annotation.
Private Sub cmdBackColor_Click()
'This example uses the Microsoft color dialog box to change
'a selected text attachment annotation mark's background color.
Dim BackColor As Long
'Determine the current color of the selected annotation
'mark and init the dialog box color property to that color.
BackColor = ImgEdit1.GetSelectedAnnotationBackColor
CommonDialog1.Color = BackColor
CommonDialog1.Flags = cdlCCRGBInit
'Display the dialog box, and set the annotation background color
'to the color selected.
CommonDialog1.ShowColor
ImgEdit1.SetSelectedAnnotationBackColor CommonDialog1.Color
End Sub