111 references to Null
System.Drawing.Common (1)
System\Drawing\Printing\PageSettings.cs (1)
326HWND.Null,
System.Private.Windows.Core (1)
Windows\Win32\Graphics\Gdi\GetDcScope.cs (1)
55public static GetDcScope ScreenDC => new(HWND.Null);
System.Windows.Forms (99)
System\Windows\Forms\Accessibility\AccessibleObject.cs (1)
2554*phwnd = HWND.Null;
System\Windows\Forms\Accessibility\Control.ControlAccessibleObject.cs (2)
22private HWND _handle = HWND.Null; 524=> UIAHelper.WindowHandleToVariant(Owner?.InternalHandle ?? HWND.Null),
System\Windows\Forms\Accessibility\LabelEditAccessibleObject.cs (2)
41UIA_PROPERTY_ID.UIA_NativeWindowHandlePropertyId => UIAHelper.WindowHandleToVariant(_labelEdit.TryGetTarget(out var target) ? target.HWND : HWND.Null), 79_labelEdit.TryGetTarget(out var target) ? (int)target.HWND : (int)HWND.Null
System\Windows\Forms\Accessibility\LabelEditNativeWindow.cs (1)
71public bool IsHandleCreated => Handle != HWND.Null;
System\Windows\Forms\Accessibility\LabelEditUiaTextProvider.cs (3)
228PInvokeCore.MapWindowPoints(_owningChildEdit.Handle, HWND.Null, ref pt); 272if (PInvokeCore.MapWindowPoints(HWND.Null, _owningChildEdit.Handle, ref clientLocation) == 0) 308PInvokeCore.MapWindowPoints(_owningChildEdit.Handle, HWND.Null, ref r);
System\Windows\Forms\ActiveX\AxHost.AxContainer.ExtenderProxy.cs (1)
263public HWND Hwnd => GetControl()?.HWND ?? HWND.Null;
System\Windows\Forms\ActiveX\AxHost.cs (5)
1760hwnd = (ContainingControl is null) ? HWND.Null : ContainingControl.HWND, 2159parent is null ? HWND.Null : parent.HWND, 2971hWndOwner = (ContainingControl is null) ? HWND.Null : ContainingControl.HWND, 3026HWND handle = ContainingControl is null ? HWND.Null : ContainingControl.HWND; 3139HWND hwnd = HWND.Null;
System\Windows\Forms\ActiveX\AxHost.OleInterfaces.cs (3)
305HWND hwnd = HWND.Null; 345*phwnd = _host.ParentInternal?.HWND ?? HWND.Null; 402lpFrameInfo->hwndFrame = _host.ParentInternal?.HWND ?? HWND.Null;
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (1)
756*phwnd = HWND.Null;
System\Windows\Forms\Application.ComponentManager.cs (4)
201return PInvokeCore.PeekMessage(&msg, HWND.Null, 0, 0, PEEK_MESSAGE_REMOVE_TYPE.PM_NOREMOVE); 231if (PInvokeCore.PeekMessage(&msg, HWND.Null, 0, 0, PEEK_MESSAGE_REMOVE_TYPE.PM_NOREMOVE)) 239PInvoke.GetMessage(&msg, HWND.Null, 0, 0); 309if (!PInvokeCore.PeekMessage(&msg, HWND.Null, 0, 0, PEEK_MESSAGE_REMOVE_TYPE.PM_NOREMOVE))
System\Windows\Forms\Application.ComponentThreadContext.cs (4)
292if (PInvoke.GetMessage(&msg, HWND.Null, 0, 0)) 309else if (!PInvokeCore.PeekMessage(&msg, HWND.Null, 0, 0, PEEK_MESSAGE_REMOVE_TYPE.PM_NOREMOVE)) 454if (!PInvokeCore.PeekMessage(&temp, HWND.Null, 0, 0, PEEK_MESSAGE_REMOVE_TYPE.PM_NOREMOVE)) 478HWND IMsoComponent.Interface.HwndGetWindow(msocWindow dwWhich, uint dwReserved) => HWND.Null;
System\Windows\Forms\Application.LightThreadContext.cs (4)
64if (!PInvokeCore.PeekMessage(&temp, HWND.Null, 0, 0, PEEK_MESSAGE_REMOVE_TYPE.PM_NOREMOVE)) 83if (PInvokeCore.PeekMessage(&msg, HWND.Null, 0, 0, PEEK_MESSAGE_REMOVE_TYPE.PM_NOREMOVE)) 91PInvoke.GetMessage(&msg, HWND.Null, 0, 0); 134if (!PInvokeCore.PeekMessage(&msg, HWND.Null, 0, 0, PEEK_MESSAGE_REMOVE_TYPE.PM_NOREMOVE))
System\Windows\Forms\ComponentModel\COM2Interop\COM2ComponentEditor.cs (1)
51HWND handle = parent is null ? HWND.Null : (HWND)parent.Handle;
System\Windows\Forms\Control.cs (7)
9395PInvokeCore.MapWindowPoints(HWND.Null, this, ref rect); 9405PInvokeCore.MapWindowPoints(this, HWND.Null, ref rect); 10198PInvoke.SetWindowPos(this, HWND.Null, x, y, width, height, flags); 10326if (PInvoke.SetParent(this, HWND.Null).IsNull) 10457HWND.Null, 10869PInvokeCore.MapWindowPoints(HWND.Null, PInvoke.GetParent(this), ref rect); 12031HWND hWnd = HWND.Null;
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonStandardAdapter.cs (1)
61ScaleHelper.IsScalingRequirementMet ? Control.HWNDInternal : HWND.Null);
System\Windows\Forms\Controls\Buttons\ButtonRenderer.cs (1)
126DrawButtonForHandle(g, bounds, focused, state, HWND.Null);
System\Windows\Forms\Controls\Buttons\CheckBoxRenderer.cs (1)
110CheckBoxState state) => DrawCheckBox(g, glyphLocation, textBounds, checkBoxText, font, flags, focused, state, HWND.Null);
System\Windows\Forms\Controls\Buttons\RadioButtonRenderer.cs (4)
51DrawRadioButton(g, glyphLocation, state, HWND.Null); 113DrawRadioButton(g, glyphLocation, textBounds, radioButtonText, font, flags, focused, state, HWND.Null); 201HWND.Null); 254return GetGlyphSize(hdc, state, HWND.Null);
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxItemAccessibleObject.cs (1)
54PInvokeCore.MapWindowPoints(listHandle, HWND.Null, ref translated);
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (1)
2385_dropDownHandle = HWND.Null;
System\Windows\Forms\Controls\ComboBox\ComboBoxRenderer.cs (1)
105DrawDropDownButtonForHandle(hdc, bounds, state, HWND.Null);
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
25621_editingPanel?.ReleaseUiaProvider(HWND.Null);
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (1)
2430EditingComboBox?.ReleaseUiaProvider(HWND.Null);
System\Windows\Forms\Controls\ListBoxes\ListBox.ItemAccessibleObject.cs (1)
171UIA_PROPERTY_ID.UIA_NativeWindowHandlePropertyId => UIAHelper.WindowHandleToVariant(HWND.Null),
System\Windows\Forms\Controls\ListView\ListViewGroup.ListViewGroupAccessibleObject.cs (1)
189UIA_PROPERTY_ID.UIA_NativeWindowHandlePropertyId => UIAHelper.WindowHandleToVariant(HWND.Null),
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemBaseAccessibleObject.cs (1)
194return UIAHelper.WindowHandleToVariant(HWND.Null);
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (3)
1866_helpPane?.ReleaseUiaProvider(HWND.Null); 1867_commandsPane?.ReleaseUiaProvider(HWND.Null); 1868_toolStrip?.ReleaseUiaProvider(HWND.Null);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\DropDownButton.cs (1)
148ScaleHelper.IsScalingRequirementMet ? HWNDInternal : HWND.Null);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.GridEntryAccessibleObject.cs (2)
210? (int)(owner?.OwnerGridView?.InternalHandle ?? HWND.Null) 211: (int)HWND.Null,
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (8)
4793_scrollBar?.ReleaseUiaProvider(HWND.Null); 4794_listBox?.ReleaseUiaProvider(HWND.Null); 4795_dropDownHolder?.ReleaseUiaProvider(HWND.Null); 4796_editTextBox?.ReleaseUiaProvider(HWND.Null); 4797_dropDownButton?.ReleaseUiaProvider(HWND.Null); 4798_dialogButton?.ReleaseUiaProvider(HWND.Null); 4938HWND.Null, 5011HWND.Null,
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.cs (1)
855_control?.ReleaseUiaProvider(HWND.Null);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownItem.cs (1)
640_dropDown?.ReleaseUiaProvider(HWND.Null);
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.ModalMenuFilter.cs (2)
210PInvoke.ShowCaret(HWND.Null); 470PInvoke.HideCaret(HWND.Null);
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.FeedbackRectangle.FeedbackDropDown.cs (1)
54HWND.Null,
System\Windows\Forms\Controls\TrackBar\TrackBar.TrackBarChildAccessibleObject.cs (1)
61(int)(this.TryGetOwnerAs(out TrackBar? owner) ? owner.InternalHandle : HWND.Null),
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (2)
333hwnd = HWND.Null, 425HWND hwndInPlaceObject = HWND.Null;
System\Windows\Forms\Controls\WebBrowser\WebBrowserSiteBase.cs (2)
187HWND hwnd = HWND.Null; 271lpFrameInfo->hwndFrame = Host.ParentInternal is { } parent ? parent.HWND : HWND.Null;
System\Windows\Forms\Dialogs\TaskDialog\TaskDialog.cs (2)
665_handle = HWND.Null; 1012_handle = HWND.Null;
System\Windows\Forms\ErrorProvider\ErrorProvider.ControlItem.ControlItemAccessibleObject.cs (1)
90=> UIAHelper.WindowHandleToVariant(_window?.Handle ?? HWND.Null),
System\Windows\Forms\Help\Help.cs (1)
163PInvoke.HtmlHelp(HWND.Null, pathAndFileName, HH_DISPLAY_TOPIC, null);
System\Windows\Forms\NativeWindow.cs (5)
414HWND createResult = HWND.Null; 541HWND = HWND.Null; 573handle = HWND.Null; 626w?.HWND = HWND.Null; 688HWND = HWND.Null;
System\Windows\Forms\Printing\PrinterSettingsExtensions.cs (2)
26modeSize = PInvoke.DocumentProperties(HWND.Null, HANDLE.Null, n, null, (DEVMODEW*)null, 0); 39HWND.Null,
System\Windows\Forms\Rendering\ControlPaint.cs (1)
335using GetDcScope screenDC = new(HWND.Null);
System\Windows\Forms\ToolTip\ToolTip.cs (4)
1047return HWND.Null; 1050HWND baseHwnd = current?.HWND ?? HWND.Null; 1051HWND hwnd = HWND.Null; 1104hwnd = HWND.Null;
System\Windows\Forms\VisualStyles\VisualStyleRenderer.cs (5)
106using PInvoke.OpenThemeDataScope handle = new(HWND.Null, className); 216DrawBackground(hdc, bounds, HWND.Null); 245DrawBackground(hdc, bounds, clipRectangle, HWND.Null); 576return GetPartSize(hdc, type, HWND.Null); 883return Create(className, throwExceptionOnFail, HWND.Null);
System.Windows.Forms.Design (3)
System\Windows\Forms\Design\ControlDesigner.ChildWindowTarget.cs (1)
12private HWND _handle = HWND.Null;
System\Windows\Forms\Design\ListViewDesigner.cs (1)
84PInvokeCore.MapWindowPoints(HWND.Null, headerHwnd, ref point);
System\Windows\Forms\Design\OleDragDropHandler.cs (1)
491while (PInvokeCore.PeekMessage(&msg, HWND.Null, PInvokeCore.WM_PAINT, PInvokeCore.WM_PAINT, PEEK_MESSAGE_REMOVE_TYPE.PM_REMOVE))
System.Windows.Forms.Tests (5)
System\Windows\Forms\CheckBoxRendererTests.cs (1)
141CheckBoxRenderer.DrawCheckBox(graphics, point, bounds, control.Text, SystemFonts.DefaultFont, TextFormatFlags.Default, focus, cBState, HWND.Null);
System\Windows\Forms\ClipboardTests.cs (1)
559OpenClipboard(HWND.Null).Should().BeTrue();
System\Windows\Forms\FormTests.cs (1)
2746var message = Message.Create(HWND.Null, PInvokeCore.WM_QUERYENDSESSION, wparam: default, lparam: default);
System\Windows\Forms\RadioButtonRendererTests.cs (2)
136HWND.Null 311HWND hwnd = HWND.Null;
System.Windows.Forms.UI.IntegrationTests (1)
Infra\ControlTestBase.cs (1)
108Assert.Equal(HWND.Null, PInvoke.GetCapture());
WinFormsControlsTest (1)
ScalingBeforeChanges.cs (1)
88HWND.Null,