37 references to new
System.Drawing.Common.Tests (3)
System\Drawing\ImageTests.cs (1)
675using SelectObjectScope penScope = new(hdc, pen);
System\Drawing\Imaging\MetafileTests.cs (2)
1028using SelectObjectScope penScope = new(hdc, pen); 1029using SelectObjectScope brushScope = new(hdc, brush);
System.Windows.Forms (17)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (1)
1710using SelectObjectScope targetBitmapSelection = new(compatibleDC, compatibleBitmap);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (1)
3712using SelectObjectScope fontSelection = new(hdc, hFont);
System\Windows\Forms\Controls\Splitter\Splitter.cs (1)
702using SelectObjectScope selection = new(dc, halftone);
System\Windows\Forms\Design\ComponentEditorForm.PageSelector.cs (1)
102using SelectObjectScope fontSelection = new(
System\Windows\Forms\Layout\Containers\ContainerControl.cs (1)
720using SelectObjectScope fontSelection = new(dc, fontHandle);
System\Windows\Forms\Layout\Containers\SplitContainer.cs (1)
1477using SelectObjectScope selectBrush = new(dc, halftone);
System\Windows\Forms\Rendering\ControlPaint.cs (7)
310using SelectObjectScope sourceBitmapSelection = new(sourceDC, (HGDIOBJ)monochromeMask); 311using SelectObjectScope targetBitmapSelection = new(targetDC, (HGDIOBJ)colorMask.Value); 1810using SelectObjectScope brushSelection = new(desktopDC, PInvokeCore.GetStockObject(GET_STOCK_OBJECT_FLAGS.NULL_BRUSH)); 1811using SelectObjectScope penSelection = new(desktopDC, pen); 1831using SelectObjectScope brushSelection = new(desktopDC, PInvokeCore.GetStockObject(GET_STOCK_OBJECT_FLAGS.NULL_BRUSH)); 1832using SelectObjectScope penSelection = new(desktopDC, pen); 2046using SelectObjectScope brushSelection = new(desktopDC, brush);
System\Windows\Forms\Rendering\FontCache.Data.cs (1)
40using SelectObjectScope fontSelection = new(hdc, HFONT);
System\Windows\Forms\Rendering\TextExtensions.cs (3)
70using SelectObjectScope fontSelection = new(hdc, (HFONT)font); 246using SelectObjectScope fontSelection = new(hdc, font.Object); 290using SelectObjectScope selectFont = new(hdc, hfont);
System.Windows.Forms.Design (11)
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (1)
83using SelectObjectScope fontSelection = new(hdc, hFont);
System\ComponentModel\Design\MultilineStringEditor.MultilineStringEditorUI.cs (1)
182using SelectObjectScope fontSelection = new(hdc, font);
System\Windows\Forms\Design\DesignerUtils.cs (7)
251using SelectObjectScope brushSelection = new(hDC, isPrimary ? s_grabHandleFillBrushPrimary : s_grabHandleFillBrush); 252using SelectObjectScope penSelection = new(hDC, isPrimary ? s_grabHandlePenPrimary : s_grabHandlePen); 266using SelectObjectScope brushSelection = new(hDC, isPrimary ? s_grabHandleFillBrushPrimary : s_grabHandleFillBrush); 267using SelectObjectScope penSelection = new(hDC, s_grabHandlePenPrimary); 280using SelectObjectScope penSelection = new(hDC, s_grabHandlePenPrimary); 283using SelectObjectScope brushSelection = new(hDC, s_grabHandleFillBrushPrimary); 532using SelectObjectScope hFontOld = new(dc, hFont);
System\Windows\Forms\Design\OleDragDropHandler.cs (2)
441using SelectObjectScope brushSelection = new(dc, PInvokeCore.GetStockObject(GET_STOCK_OBJECT_FLAGS.NULL_BRUSH)); 442using SelectObjectScope penSelection = new(dc, pen);
System.Windows.Forms.Primitives (5)
System\Windows\Forms\DeviceContextExtensions.cs (5)
33using SelectObjectScope penScope = new(hdc, hpen); 35using SelectObjectScope brushScope = new(hdc, PInvokeCore.GetStockObject(GET_STOCK_OBJECT_FLAGS.NULL_BRUSH)); 86using SelectObjectScope selection = new(hdc, (HGDIOBJ)hpen.Value); 143using var penSelection = pen.IsNull ? default : new SelectObjectScope(hdc, (HGDIOBJ)pen.Value); 144using var brushSelection = brush.IsNull ? default : new SelectObjectScope(hdc, (HGDIOBJ)brush.Value);
System.Windows.Forms.Tests (1)
Text\FontMetrics.cs (1)
144using SelectObjectScope fontSelection = new(screen, hfont.Object);