22 instantiations of GetDcScope
System.Drawing.Common.Tests (1)
System\Drawing\GdiPlusHandlesTests.cs (1)
27using GetDcScope hdc = new(PInvokeCore.GetForegroundWindow());
System.Windows.Forms (17)
System\Windows\Forms\Accessibility\LabelEditUiaTextProvider.cs (1)
376using GetDcScope hdc = new(_owningChildEdit.Handle);
System\Windows\Forms\Control.cs (1)
11926using GetDcScope dc = new(HWND);
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxUiaTextProvider.cs (1)
451using GetDcScope hdc = new(_owningChildEdit.Handle);
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (2)
5706using GetDcScope dc = new(HWND, HRGN.Null, GET_DCX_FLAGS.DCX_CACHE | GET_DCX_FLAGS.DCX_LOCKWINDOWUPDATE); 5725using GetDcScope dc = new(HWND, HRGN.Null, GET_DCX_FLAGS.DCX_CACHE | GET_DCX_FLAGS.DCX_LOCKWINDOWUPDATE);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (2)
2370using GetDcScope hdc = new(HWND); 3703using GetDcScope hdc = new(DropDownListBox.HWND);
System\Windows\Forms\Controls\Splitter\Splitter.cs (1)
699using GetDcScope dc = new(ParentInternal.HWND, HRGN.Null, GET_DCX_FLAGS.DCX_CACHE | GET_DCX_FLAGS.DCX_LOCKWINDOWUPDATE);
System\Windows\Forms\Controls\TextBox\TextBoxBase.TextBoxBaseUiaTextProvider.cs (1)
457using GetDcScope hdc = new(Owner.HWND);
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.ToolStripTextBoxControl.cs (1)
234using GetDcScope hdc = new(m.HWND, HRGN.Null, GET_DCX_FLAGS.DCX_WINDOW | (GET_DCX_FLAGS)0x00010000 /* DCX_USESTYLE */);
System\Windows\Forms\ErrorProvider\ErrorProvider.ErrorWindow.cs (1)
372using GetDcScope hdc = new(HWND);
System\Windows\Forms\Layout\Containers\SplitContainer.cs (1)
1474using GetDcScope dc = new(HWND, HRGN.Null, GET_DCX_FLAGS.DCX_CACHE | GET_DCX_FLAGS.DCX_LOCKWINDOWUPDATE);
System\Windows\Forms\Printing\PrintPreviewControl.cs (1)
476using GetDcScope hdc = new(HWND);
System\Windows\Forms\Rendering\ControlPaint.cs (4)
307using GetDcScope screenDC = new(HWND.Null); 1797using GetDcScope desktopDC = new( 1824using GetDcScope desktopDC = new( 2039using GetDcScope desktopDC = new(
System.Windows.Forms.Design (3)
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (1)
80using (GetDcScope hdc = new((HWND)listBox.Handle))
System\Windows\Forms\Design\DesignerUtils.cs (1)
388using GetDcScope controlDC = new((HWND)control.Handle);
System\Windows\Forms\Design\OleDragDropHandler.cs (1)
437using GetDcScope dc = new(handle);
WinFormsControlsTest (1)
ScalingBeforeChanges.cs (1)
36using GetDcScope dc = new(hwnd);
66 references to GetDcScope
System.Drawing.Common.Tests (7)
System\Drawing\GdiPlusHandlesTests.cs (1)
27using GetDcScope hdc = new(PInvokeCore.GetForegroundWindow());
System\Drawing\GraphicsTests.cs (6)
84using var hdc = GetDcScope.ScreenDC; 93using var hdc = GetDcScope.ScreenDC; 102using var hdc = GetDcScope.ScreenDC;
System.Private.Windows.Core (5)
Windows\Win32\Graphics\Gdi\GetDcScope.cs (3)
55public static GetDcScope ScreenDC => new(HWND.Null); 59public static implicit operator nint(in GetDcScope scope) => scope.HDC; 60public static implicit operator HDC(in GetDcScope scope) => scope.HDC;
Windows\Win32\Graphics\Gdi\HBITMAP.cs (2)
21using var screenDC = GetDcScope.ScreenDC;
System.Private.Windows.GdiPlus (1)
Windows\Win32\Graphics\Gdi\HdcExtensions.cs (1)
13public static SelectPaletteScope HalftonePalette(this GetDcScope hdc, bool forceBackground, bool realizePalette) =>
System.Windows.Forms (31)
System\Windows\Forms\Accessibility\LabelEditUiaTextProvider.cs (1)
376using GetDcScope hdc = new(_owningChildEdit.Handle);
System\Windows\Forms\ActiveX\AxHost.cs (2)
1061using var dc = GetDcScope.ScreenDC;
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (2)
282using var dc = GetDcScope.ScreenDC;
System\Windows\Forms\Control.cs (1)
11926using GetDcScope dc = new(HWND);
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxUiaTextProvider.cs (1)
451using GetDcScope hdc = new(_owningChildEdit.Handle);
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (2)
5706using GetDcScope dc = new(HWND, HRGN.Null, GET_DCX_FLAGS.DCX_CACHE | GET_DCX_FLAGS.DCX_LOCKWINDOWUPDATE); 5725using GetDcScope dc = new(HWND, HRGN.Null, GET_DCX_FLAGS.DCX_CACHE | GET_DCX_FLAGS.DCX_LOCKWINDOWUPDATE);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (2)
2370using GetDcScope hdc = new(HWND); 3703using GetDcScope hdc = new(DropDownListBox.HWND);
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (2)
2778using var dc = GetDcScope.ScreenDC;
System\Windows\Forms\Controls\Splitter\Splitter.cs (1)
699using GetDcScope dc = new(ParentInternal.HWND, HRGN.Null, GET_DCX_FLAGS.DCX_CACHE | GET_DCX_FLAGS.DCX_LOCKWINDOWUPDATE);
System\Windows\Forms\Controls\TextBox\TextBoxBase.TextBoxBaseUiaTextProvider.cs (1)
457using GetDcScope hdc = new(Owner.HWND);
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.ToolStripTextBoxControl.cs (1)
234using GetDcScope hdc = new(m.HWND, HRGN.Null, GET_DCX_FLAGS.DCX_WINDOW | (GET_DCX_FLAGS)0x00010000 /* DCX_USESTYLE */);
System\Windows\Forms\Controls\WebBrowser\WebBrowserHelper.cs (4)
68using var dc = GetDcScope.ScreenDC; 83using var dc = GetDcScope.ScreenDC;
System\Windows\Forms\Dialogs\CommonDialogs\FontDialog.cs (4)
382using var dc = GetDcScope.ScreenDC; 465using var dc = GetDcScope.ScreenDC;
System\Windows\Forms\ErrorProvider\ErrorProvider.ErrorWindow.cs (1)
372using GetDcScope hdc = new(HWND);
System\Windows\Forms\Layout\Containers\SplitContainer.cs (1)
1474using GetDcScope dc = new(HWND, HRGN.Null, GET_DCX_FLAGS.DCX_CACHE | GET_DCX_FLAGS.DCX_LOCKWINDOWUPDATE);
System\Windows\Forms\Printing\PrintPreviewControl.cs (1)
476using GetDcScope hdc = new(HWND);
System\Windows\Forms\Rendering\ControlPaint.cs (4)
307using GetDcScope screenDC = new(HWND.Null); 1797using GetDcScope desktopDC = new( 1824using GetDcScope desktopDC = new( 2039using GetDcScope desktopDC = new(
System.Windows.Forms.Design (5)
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (1)
80using (GetDcScope hdc = new((HWND)listBox.Handle))
System\ComponentModel\Design\MultilineStringEditor.MultilineStringEditorUI.cs (2)
180using var hdc = GetDcScope.ScreenDC;
System\Windows\Forms\Design\DesignerUtils.cs (1)
388using GetDcScope controlDC = new((HWND)control.Handle);
System\Windows\Forms\Design\OleDragDropHandler.cs (1)
437using GetDcScope dc = new(handle);
System.Windows.Forms.Primitives (6)
System\Windows\Forms\Automation\UiaTextRange.cs (2)
887using var dc = GetDcScope.ScreenDC;
System\Windows\Forms\DeviceContextExtensions.cs (2)
125internal static Graphics CreateGraphics(this GetDcScope hdc) => Graphics.FromHdcInternal(hdc.HDC); 149internal static void FillRectangle(this GetDcScope hdc, HBRUSH hbrush, Rectangle rectangle) =>
System\Windows\Forms\Internals\ScaleHelper.cs (2)
66using var dc = GetDcScope.ScreenDC;
System.Windows.Forms.Primitives.Tests (8)
System\Windows\Forms\DeviceContextHdcScopeTests.cs (8)
93using var hdc = GetDcScope.ScreenDC; 216using var hdc = GetDcScope.ScreenDC; 288using var hdc = GetDcScope.ScreenDC; 321using var hdc = GetDcScope.ScreenDC;
System.Windows.Forms.Primitives.TestUtilities (2)
GdiHelper.cs (2)
13using var dc = GetDcScope.ScreenDC;
WinFormsControlsTest (1)
ScalingBeforeChanges.cs (1)
36using GetDcScope dc = new(hwnd);