[]
Creates a graphics holder from a printer or screen device contexts, depending on passing parameters.
When the holder is disposed, both graphics and the device context are released (DeleteDC is called on the device context).
If printerName is null or specifies invalid printer name
then printer will be autoselected from list of available printers,
if no printers are installed then FromScreen() method will be called.
public static GraphicsHolder FromDevice(MeasurementDevice device, string printerName, out MeasurementDevice actualDevice, out string actualPrinterName)
Public Shared Function FromDevice(device As MeasurementDevice, printerName As String, ByRef actualDevice As MeasurementDevice, ByRef actualPrinterName As String) As GraphicsHolder
| Type | Name | Description |
|---|---|---|
| MeasurementDevice | device | The type of device to use (printer or screen). |
| string | printerName | The name of the printer. |
| MeasurementDevice | actualDevice | The actual device (printer or screen) used to measure the objects of a C1Document or C1FlexReport. |
| string | actualPrinterName | The actual printer name. |
| Type | Description |
|---|---|
| GraphicsHolder | The new instance of the graphics holder. |