Microsoft KB Archive/230489

= How To Annotate an Image with Text Using the Wang (Kodak) ImageEdit Control =

Article ID: 230489

Article Last Modified on 6/29/2004

-

APPLIES TO


 * Microsoft Visual Basic 5.0 Learning Edition
 * Microsoft Visual Basic 6.0 Learning Edition
 * Microsoft Visual Basic 5.0 Professional Edition
 * Microsoft Visual Basic 6.0 Professional Edition
 * Microsoft Visual Basic 5.0 Enterprise Edition
 * Microsoft Visual Basic 6.0 Enterprise Edition

-



This article was previously published under Q230489



SUMMARY
When displaying an image in the Wang (Kodak) ImageEdit control, you might want to add text to the image. This article illustrates how this can be accomplished.



MORE INFORMATION
The Wang (Kodak) controls, including ImageEdit, do not ship with Visual Basic, but are included with some versions of Windows. The later versions of the Wang controls are renamed as the Kodak controls. See the REFERENCES section below for more information.

The following code example demonstrates how to accomplish this using the Annotation features of the control. Please note that you will need to change the .Image property to a file that resides on your computer.  Start a new Standard EXE project in Visual Basic. Form1 is created by default. From the Project menu, select Components, select either the Wang Image Edit Control or the Kodak Image Edit Control and click OK. Add an instance of the Wang (Kodak) ImageEdit control to Form1.  Add the following code to Form1: With ImgEdit1

' select a path to an image on your system .Image = "E:\tiffWANG\Simplicity1024.tif" .Display .AnnotationType = wiTextStamp .AnnotationFontColor = vbGreen .AnnotationStampText = "KILROY WAS HERE!" .Draw 10, 10 .AnnotationType = wiNone End With 

