Prints the control to a System.Drawing.Graphics or Printer object.
Syntax:
PrinterObject.PrintControl(oGraphics/DestHdc As System.Drawing.Graphics/Long, XOrigin As Integer, YOrigin As Integer, XOriginExtents As Integer, YOriginExtents As Integer, MarginX As Integer, MarginY As Integer, DestScale As Integer)
The PrintControl Method (Printer Object) syntax has these parts:
| Part |
Description |
| PrinterObject |
An object expression that evaluates to a Printer object. |
| oGraphics/DestHdc |
A destination System.Drawing.Graphics object in .Net languages or a handle to a device context for ActiveX controls. |
| Xorigin |
A long integer value that determines the start x coordinate of the clipping region for the ActiveGantt control. |
| Yorigin |
A long integer value that determines the start y coordinate of the clipping region for the ActiveGantt control. |
| XOriginExtents |
A long integer value that determines the width of the of the clipping region for the ActiveGantt control. This value can be greater than what the control is displaying on screen. |
| YOriginExtents |
A long integer value that determines the height of the of the clipping region for the ActiveGantt control. This value can be greater than what the control is displaying on screen. |
| MarginX |
A long integer value that determines the start x coordinate on the destination device context. |
| MarginY |
A long integer value that determines the start y coordinate on the destination device context. |
| Scale |
A long integer value that determines the scale of the image that will be drawn on the destination device context. 100 = 100%. |
Remarks:
You can use this method in conjunction with the.Net System.Drawing.Printing.PrintDocument object in .Net languages or with the Printer object in Visual Basic 6 to print the Control.