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