1 write to _modeHandle
System.Drawing.Common (1)
System\Drawing\Printing\PrintController.cs (1)
218
_modeHandle
= (SafeDeviceModeHandle)document.PrinterSettings.GetHdevmode(document.DefaultPageSettings);
11 references to _modeHandle
System.Drawing.Common (11)
System\Drawing\Printing\DefaultPrintController.cs (6)
31
Debug.Assert(
_modeHandle
is not null, "_modeHandle should have been set by PrintController.OnStartPrint");
32
_hdc = new(document.PrinterSettings.CreateDeviceContext(
_modeHandle
));
74
Debug.Assert(
_modeHandle
is not null);
77
e.PageSettings.CopyToHdevmode(
_modeHandle
);
78
DEVMODEW* devmode = (DEVMODEW*)PInvokeCore.GlobalLock(
_modeHandle
);
86
PInvokeCore.GlobalUnlock(
_modeHandle
);
System\Drawing\Printing\PreviewPrintController.cs (2)
37
_hdc = new(document.PrinterSettings.CreateInformationContext(
_modeHandle
?? HGLOBAL.Null));
49
e.PageSettings.CopyToHdevmode(
_modeHandle
!);
System\Drawing\Printing\PrintController.cs (3)
200
Debug.Assert(
_modeHandle
is not null, "modeHandle is null. Someone must have forgot to call base.StartPrint");
202
Rectangle pageBounds = pageSettings.GetBounds(
_modeHandle
);
224
public virtual void OnEndPrint(PrintDocument document, PrintEventArgs e) =>
_modeHandle
?.Close();