Image Viewer CP Gold SDK ActiveX

Image Viewer CP Gold SDK ActiveX

Platform : Windows 10, Windows 8, Vista, Windows 7, XP

For Windows Developers who need to PDF TIFF Viewer and Image Viewer , plus support TIFF with WANG Annotations, securing a PDF document, add annotation with PDF for C , C#, VB.NET , VB, Delphi, Vfp, MS Access.

Popular Solution Go   Back

VFP - How to draw rectangles , circles, lines, text and freehand on the image using Visual FoxPro

Step 1: To install the Image Viewer Cp Gold ActiveX Control, begin by launching the setup file (imageviewercpgoldsetup.exe). Select the desired installation folder for the Image Viewer CP Gold ActiveX and continue with the installation on your development computer.

Step 2: Select Tools- Option, select Controls - ActiveX Control,  Image Viewer Cp Gold ActiveX , Click OK
 

Step 3: Create New VFP Project, select Documents tab, add New Form.
 

Step 4: In toolbar, click View Classes icon and select ActiveX Controls item, you will see Image Viewer Cp Gold ActiveX icon and then drag it to form.

 

Step 5: Design the UI same as following
 

Step 6: When click select image button, it will call FileName or LoadMulitPage methods to load the image. Then you may draw the selection rectangle on image, select the type, click draw button.

Step 7:  You need add 4 properties to form. iSelLeft, iSelTop, iSelWidth, iSelHeight properties to hold the selection rectangle value.  When you drawn the selection rectangle, it will fired SelectionRectDrawn event.

 

Step 8: In Draw button click event, according your selected type,  it will draw fillrectangle , circle, line or text.
 

Step 8: In Undo Last Draw click event, according your selected type, it allow undo the last drawing item. 

Step 9: Finally you may save to single page file or multipage document if you loaded is multipage TIFF or PDF file.

Step 10: Download the sample source code from vfp_drawmoreshapes.zip