Home > BSPrinter documentation > Reference

GDIPlusGraphics Property


Applies to: PrintPreview control , IPrinterEx object


Type: Long (Read only)


Description:

Returns a handle to a GDI+ Graphics object that can be used to draw with that technology.

For drawing with GDI+, use this Graphics object instead of the one obtained with the GdipCreateFromHDC API, because if doing so, there can be problems with transparencies and device printers that use Postscript because the component uses metafiles.

Notes:
Do not make a cache copy of the handle obtained with this property because it changes for every page. As a side note, the same care must be taken with the Printer.hDC property of the replacement Printer object.

When you finished drawing, do not delete this object with the GdipDeleteGraphics API. It is deleted by the component at a proper moment when it is no longer needed.