AnnotationFillColor Example VB

This example uses the AnnotationFillColor property to set the color of a Filled Rectangle annotation to blue.  The annotation is then drawn on the Image Edit control specified by the DestImageControl property.

Private Sub cmdDestImage_Click()
    'If there are multiple ImgEdit controls within an
    'application, use the DestImage control to define
    'which image window to place annotation marks on.

    'ImageControl names will default to ImgEdit1, ImgEdit2,
    'etc. at the time the controls are drawn.  The control
    'name could be changed at design time if desired.

    'Draw a straight line on the Image Edit control whose
    'ImageControl name is ImgEdit2
    ImgAnnTool1.DestImageControl = "ImgEdit2"
    ImgAnnTool1.AnnotationType = wiStraightLine
    ImgAnnTool1.Draw 10, 10, 100, 100
    
    'Sets the AnnotationType to a filled rectangle and
    'the fill color of the rectangle to blue using Visual
    'Basic color constants.
    ImgAnnTool1.AnnotationType = wiFilledRect '4
    ImgAnnTool1.AnnotationFillColor = vbBlue
     
    'Draw the blue rectangle on the Image Edit control whose
    'ImageControl name is ImgEdit1
    ImgAnnTool1.DestImageControl = "ImgEdit1"
    ImgAnnTool1.Draw 10, 10, 100, 100
End Sub