Example 1 places a customized rubber stamp at a predetermined location on the image. The AnnotationFont and AnnotationFontColor properties are set to determine the stamp's font and font color.
Example 2 shows how to change the properties of the font object identified by the AnnotationFont property.
Example 1
Private Sub cmdStamp_Click()
ImgEdit1.AnnotationFont = "Courier"
ImgEdit1.AnnotationFontColor = vbRed
'This stamp uses embedded text macros for date and time
ImgEdit1.AnnotationStampText = "Application received on %B %d, %Y at %H"
ImgEdit1.AnnotationType = wiTextStamp '8
ImgEdit1.Draw 10, 10
End Sub
Example 2
Private Sub cmdAnnoFont_Click()
'This example shows how to change the properties of the font
'object identified by the AnnotationFont property. This
'would define the font to be used for all text annotations.
Dim AnnoFont As IFontDisp
Set AnnoFont = ImgEdit1.AnnotationFont
With AnnoFont
.Bold = True
.Italic = True
.Name = "Arial"
.Size = 16
.Underline = True
.Strikethrough = True
End With
End Sub