In this example, the DestImageControl property determines which Image Edit control will draw Image Annotation Tool Button annotations.
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