The features described in this topic are obsolete
and should not be used in new IDL code.
Copying and Printing IDL Graphics
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:
Opening the VBCopyPrint project
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.
Running the VBCopyPrint Example
Select "Start" from the Run menu to run the example. You should see the graphic shown in the following figure.
Copying IDL Graphic to the Clipboard
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.
Printing the IDL Graphic Using IDL Object Graphics
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.
Executing IDL User Routines with Visual Basic
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.
Printing the IDL Graphic Using Visual Basic
The VBPrint command uses the Windows clipboard and Visual Basic printer support to print the IDL Graphic, as shown in the following table.

