126 references to IsNull
System.Drawing.Common.Tests (1)
Helpers.cs (1)
132if (hwnd.IsNull)
System.Windows.Forms (110)
System\Windows\Forms\Accessibility\Control.ControlAccessibleObject.cs (3)
258if (_handle.IsNull) 465if (HandleInternal.IsNull || AppContextSwitches.NoClientNotifications) 539if (HandleInternal.IsNull)
System\Windows\Forms\ActiveX\AxHost.cs (1)
3209if (!handle.IsNull)
System\Windows\Forms\ActiveX\AxHost.OleInterfaces.cs (1)
312if (!hwnd.IsNull)
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (2)
360HWND hwndMap = hwnd.IsNull ? hwndParent : hwnd; 855if (PInvoke.SetParent(_control, hwndParent).IsNull)
System\Windows\Forms\Application.cs (1)
361if (hwnd.IsNull)
System\Windows\Forms\Application.ParkingWindow.cs (1)
93if (hwndChild.IsNull)
System\Windows\Forms\Application.ThreadContext.cs (3)
751if (!hwndOwner.IsNull) 801if (!hwndOwner.IsNull) 976if (!hwndRoot.IsNull && PInvoke.IsDialogMessage(hwndRoot, in msg))
System\Windows\Forms\Application.ThreadWindows.cs (2)
84if (!_activeHwnd.IsNull && PInvoke.IsWindow(_activeHwnd)) 89if (!_focusedHwnd.IsNull && PInvoke.IsWindow(_focusedHwnd))
System\Windows\Forms\Control.cs (25)
1312return !focusHwnd.IsNull && (focusHwnd == Handle || PInvoke.IsChild(this, focusHwnd)); 2273while (!parentHandle.IsNull) 2344!(next = PInvoke.GetWindow(prev, GET_WINDOW_CMD.GW_HWNDPREV)).IsNull; 5233while (!hwnd.IsNull) 5475!hWndChild.IsNull; 5802return hwnd.IsNull || PInvoke.IsWindow(hwnd) 7089if (PInvoke.SetParent(this, parent).IsNull) 9105PInvoke.GetParent(topMostParent).IsNull ? PInvokeCore.WM_CHANGEUISTATE : PInvokeCore.WM_UPDATEUISTATE, 9349!parentHandle.IsNull 9447if (!handle.IsNull) 10271if (parentHandle != value || (parentHandle.IsNull && !topLevel)) 10275bool recreate = (parentHandle.IsNull && !topLevel) 10276|| (value.IsNull && topLevel); 10301if (value.IsNull) 10308if (PInvoke.SetParent(this, value).IsNull) 10321else if (value.IsNull && parentHandle.IsNull && topLevel) 10326if (PInvoke.SetParent(this, HWND.Null).IsNull) 10961while (!(hWnd = PInvoke.GetWindow(hWnd, GET_WINDOW_CMD.GW_HWNDPREV)).IsNull) 11000if (!parentHandle.IsNull) 11145while (!parentHandle.IsNull) 11157if (!lastParentHandle.IsNull) 11797if (dialogItem.IsNull) 11813if (!handle.IsNull && FromHandle(handle) is { } control) 12044if (hWnd.IsNull || !ReflectMessage(hWnd, ref m))
System\Windows\Forms\Control.Ime.cs (2)
270if (!focusHandle.IsNull) 280if (!focusHandle.IsNull)
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxChildNativeWindow.cs (1)
60if (!HWND.IsNull)
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (6)
542return !focus.IsNull 1881if (_childEdit is not null && !_childEdit.HWND.IsNull) 1886if (_childListBox is not null && !_childListBox.HWND.IsNull) 2297if (!hwnd.IsNull) 3345if (_dropDownHandle.IsNull) 3439if (_childEdit is not null && !_childEdit.HWND.IsNull)
System\Windows\Forms\Controls\DateTimePicker\DateTimePicker.cs (1)
1442if (!c.hwndFound.IsNull)
System\Windows\Forms\Controls\ListView\ColumnHeader.cs (1)
396if (!hwndHdr.IsNull)
System\Windows\Forms\Controls\ListView\ListView.cs (3)
2188if (hwnd.IsNull) 3795if (!header.IsNull) 4941if (!headerWindow.IsNull)
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (1)
3341if (!hWndParent.IsNull)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (3)
850gotFocus = !PInvoke.SetFocus(this).IsNull; 2562for (HWND hwnd = PInvokeCore.GetForegroundWindow(); !hwnd.IsNull; hwnd = PInvoke.GetParent(hwnd)) 4915if (!priorFocus.IsNull)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (2)
266while (!hWnd.IsNull) 269if (hWnd.IsNull)
System\Windows\Forms\Controls\TabControl\TabControl.cs (1)
1259if (!tooltipHwnd.IsNull)
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (2)
164if (!rootHwnd.IsNull) 573if (!rootHwnd.IsNull && !PInvoke.IsZoomed(rootHwnd))
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (3)
4005if (!_hwndThatLostFocus.IsNull && (_hwndThatLostFocus != Handle)) 4437if (thisHwndRoot == otherHwndRoot && !thisHwndRoot.IsNull) 4614if (!rootHwnd.IsNull)
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.ModalMenuFilter.cs (4)
139if (!hwndActive.IsNull) 194if (!ActiveHwnd.Handle.IsNull) 412if (!hwndActive.IsNull) 542if (activeWindowHandle.Handle.IsNull)
System\Windows\Forms\Controls\WebBrowser\WebBrowser.cs (1)
1105return !hwndFocus.IsNull && PInvoke.IsChild(this, hwndFocus);
System\Windows\Forms\Controls\WebBrowser\WebBrowserSiteBase.cs (1)
192if (!hwnd.IsNull)
System\Windows\Forms\Dialogs\CommonDialogs\FileDialog.cs (1)
565if (!_dialogHWnd.IsNull)
System\Windows\Forms\Dialogs\TaskDialog\TaskDialog.cs (1)
917bool isFirstNotification = _handle.IsNull;
System\Windows\Forms\Form.cs (4)
3412if (icon is not null && !TaskbarOwner.Handle.IsNull) 3905if (!ownerHandle.IsNull) 3961desktop = !hWndOwner.IsNull ? Screen.FromHandle(hWndOwner) : Screen.FromPoint(MousePosition); 5710if (!captureHwnd.IsNull)
System\Windows\Forms\Internal\WinFormsUtils.cs (1)
155if (hwnd.IsNull)
System\Windows\Forms\Layout\Containers\ContainerControl.cs (1)
629if (focusHandle.IsNull || FromChildHandle(focusHandle) != _activeControl)
System\Windows\Forms\NativeWindow.cs (12)
99if (!handle.IsNull) 129if (!HWND.IsNull) 136if (!handle.IsNull && ownedHandle) 238Debug.Assert(!handle.IsNull, "Should never insert a zero handle into the hash"); 299Debug.Assert(!hwnd.IsNull); 409if (!HWND.IsNull) 470if (createResult.IsNull) 531if (!HWND.IsNull) 615if (!handle.IsNull && handle != (HWND)(-1)) 664if (HWND.IsNull) 671if (HWND.IsNull) 704Debug.Assert(!hwnd.IsNull);
System\Windows\Forms\NativeWindow.WindowClass.cs (1)
44Debug.Assert(!hwnd.IsNull, "Windows called us with an HWND of 0");
System\Windows\Forms\OLE\DropSource.cs (1)
93if (!lastHwndTarget.IsNull && (Cursor.Position is Point point))
System\Windows\Forms\Timer.cs (8)
208public bool IsTimerRunning => _timerID != 0 && !HWND.IsNull; 212if (HWND.IsNull) 230Debug.Assert(!HWND.IsNull, "Could not create timer HWND."); 231return !HWND.IsNull; 239if (!hwnd.IsNull) 275if (hwnd.IsNull) 290if (_stoppingTimer || hwnd.IsNull || !PInvoke.IsWindow(hwnd)) 344Debug.Assert(m.HWND == HWND && !HWND.IsNull, "Timer getting messages for other windows?");
System\Windows\Forms\ToolTip\ToolTip.cs (4)
1037if (!hwndControl.IsNull) 1067else if (found.IsNull) 1091if (!hwnd.IsNull) 1530if (!hwnd.IsNull)
System\Windows\Forms\UserControl.cs (1)
249if (hwndFocus.IsNull)
System\Windows\Forms\VisualStyles\VisualStyleRenderer.cs (3)
226if (!hwnd.IsNull) 253if (!hwnd.IsNull) 584if (!hwnd.IsNull && ScaleHelper.IsThreadPerMonitorV2Aware)
System\Windows\Forms\WindowSubclassHandler.cs (1)
63if (hwnd.IsNull)
System.Windows.Forms.Design (13)
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.FlyoutDialog.cs (3)
108while (!hWnd.IsNull) 111if (hWnd.IsNull) 145if (!hWndCapture.IsNull)
System\ComponentModel\Design\DesignerActionUI.DesignerActionToolStripDropDown.cs (2)
201while (!hWndDescendant.IsNull) 204if (hWndDescendant.IsNull)
System\Drawing\Design\ColorEditor.ColorPalette.cs (1)
257if (!hwndFocus.IsNull)
System\Drawing\Design\FontEditor.cs (1)
48if (!hwndFocus.IsNull)
System\Drawing\Design\IconEditor.cs (1)
84if (!hwndFocus.IsNull)
System\Drawing\Design\ImageEditor.cs (1)
113if (!hwndFocus.IsNull)
System\Windows\Forms\Design\CommandSet.cs (1)
691if (!hwnd.IsNull)
System\Windows\Forms\Design\ControlDesigner.cs (1)
2406while (!hwndChild.IsNull)
System\Windows\Forms\Design\ImageListImageEditor.cs (1)
83if (!hwndFocus.IsNull)
System\Windows\Forms\Design\ListViewDesigner.cs (1)
79if (!hwndHit.IsNull && hwndHit != listView.Handle)
System.Windows.Forms.Primitives.TestUtilities (2)
Win32\Window.cs (1)
44if (!Handle.IsNull)
Win32\WindowClass.cs (1)
198if (window.IsNull)