|
Obsolete IDL Features: The IDLDrawWidget ActiveX Control |
|
The VBCopyPrint example demonstrates how to use either the Windows clipboard or object graphics to print the contents of an IDLDrawWidget window.
This example illustrates the following concepts:
Select "Existing" from the Visual Basic New Project dialog. In the IDL distribution, change to the examples\docs\ActiveX\VBCopyPrint directory, and open the project VBCopyPrint.vbp, as shown in the following figure.
Select "Start" from the Run menu to run the example. You should see the graphic shown in the following figure.
To copy the graphic, click on "Copy". The code for "Copy" uses the CopyWindow method to copy the contents of the graphic to the Windows clipboard as shown in line 6 of the following table.
To print the graphic using IDL, click on "IDL Print". The "IDL Print" button uses IDL's object graphics to print the contents of the window by creating an image object and sending the image to a printer object through a user routine VBPrintWindow.
The VBCopyPrint example executes a user routine, written in IDL, to support the printing of the IDLDrawWidget window. This is done with the ExecuteStr method, as shown in line 4 below, by passing a string of the routine name along with the ID of the IDLDrawWidget.
The VBPrint command uses the Windows clipboard and Visual Basic printer support to print the IDL Graphic, as shown in the following table.
IDL Online Help (March 06, 2007)