Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

Printing CWGraph

Does anyone know how to send an image of a CWGraph to the printer?

Thanks

Curt
0 Kudos
Message 1 of 4
(6,347 Views)
The easiest way would be to call the form's PrintForm method. Does this do what you want or are you wanting to just print the graph and not the form?

- Elton
0 Kudos
Message 2 of 4
(6,339 Views)
I want to print the graph only. There several other controls on the form.

Curt
0 Kudos
Message 3 of 4
(6,337 Views)
Here's an example snippet that demonstrates how to do it:


Private Sub Command1_Click()
Dim image As IPictureDisp
Set image = CWGraph1.ControlImage
Printer.PaintPicture image, 0, 0
Printer.EndDoc
End Sub


You can customize it further via optional parameters to PaintPicture, such as position on the printed page, size on the printed page, etc.

- Elton
0 Kudos
Message 4 of 4
(6,331 Views)