129 references to IsNull
System.Windows.Forms (116)
System\Windows\Forms\Accessibility\Control.ControlAccessibleObject.cs (3)
258
if (_handle.
IsNull
)
465
if (HandleInternal.
IsNull
|| AppContextSwitches.NoClientNotifications)
539
if (HandleInternal.
IsNull
)
System\Windows\Forms\ActiveX\AxHost.cs (1)
3206
if (!handle.
IsNull
)
System\Windows\Forms\ActiveX\AxHost.OleInterfaces.cs (1)
312
if (!hwnd.
IsNull
)
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (2)
360
HWND hwndMap = hwnd.
IsNull
? hwndParent : hwnd;
855
if (PInvoke.SetParent(_control, hwndParent).
IsNull
)
System\Windows\Forms\Application.cs (1)
405
if (hwnd.
IsNull
)
System\Windows\Forms\Application.ParkingWindow.cs (1)
93
if (hwndChild.
IsNull
)
System\Windows\Forms\Application.ThreadContext.cs (3)
751
if (!hwndOwner.
IsNull
)
801
if (!hwndOwner.
IsNull
)
976
if (!hwndRoot.
IsNull
&& PInvoke.IsDialogMessage(hwndRoot, in msg))
System\Windows\Forms\Application.ThreadWindows.cs (2)
84
if (!_activeHwnd.
IsNull
&& PInvoke.IsWindow(_activeHwnd))
89
if (!_focusedHwnd.
IsNull
&& PInvoke.IsWindow(_focusedHwnd))
System\Windows\Forms\Control.cs (25)
1491
return !focusHwnd.
IsNull
&& (focusHwnd == Handle || PInvoke.IsChild(this, focusHwnd));
2445
while (!parentHandle.
IsNull
)
2516
!(next = PInvoke.GetWindow(prev, GET_WINDOW_CMD.GW_HWNDPREV)).
IsNull
;
5449
while (!hwnd.
IsNull
)
5692
!hWndChild.
IsNull
;
6019
return hwnd.
IsNull
|| PInvoke.IsWindow(hwnd)
7683
if (PInvoke.SetParent(this, parent).
IsNull
)
9831
PInvoke.GetParent(topMostParent).
IsNull
? PInvokeCore.WM_CHANGEUISTATE : PInvokeCore.WM_UPDATEUISTATE,
10075
!parentHandle.
IsNull
10173
if (!handle.
IsNull
)
10997
if (parentHandle != value || (parentHandle.
IsNull
&& !topLevel))
11001
bool recreate = (parentHandle.
IsNull
&& !topLevel)
11002
|| (value.
IsNull
&& topLevel);
11027
if (value.
IsNull
)
11034
if (PInvoke.SetParent(this, value).
IsNull
)
11047
else if (value.
IsNull
&& parentHandle.
IsNull
&& topLevel)
11052
if (PInvoke.SetParent(this, HWND.Null).
IsNull
)
11687
while (!(hWnd = PInvoke.GetWindow(hWnd, GET_WINDOW_CMD.GW_HWNDPREV)).
IsNull
)
11726
if (!parentHandle.
IsNull
)
11871
while (!parentHandle.
IsNull
)
11883
if (!lastParentHandle.
IsNull
)
12527
if (dialogItem.
IsNull
)
12543
if (!handle.
IsNull
&& FromHandle(handle) is { } control)
12774
if (hWnd.
IsNull
|| !ReflectMessage(hWnd, ref m))
System\Windows\Forms\Control.Ime.cs (2)
270
if (!focusHandle.
IsNull
)
280
if (!focusHandle.
IsNull
)
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxChildNativeWindow.cs (1)
60
if (!HWND.
IsNull
)
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (6)
589
return !focus.
IsNull
1952
if (_childEdit is not null && !_childEdit.HWND.
IsNull
)
1957
if (_childListBox is not null && !_childListBox.HWND.
IsNull
)
2368
if (!hwnd.
IsNull
)
3450
if (_dropDownHandle.
IsNull
)
3546
if (_childEdit is not null && !_childEdit.HWND.
IsNull
)
System\Windows\Forms\Controls\ComboBox\ComboBox.Modern.cs (6)
67
|| comboBoxInfo.hwndItem.
IsNull
72
&& !comboBoxInfo.hwndList.
IsNull
293
|| comboBoxInfo.hwndList.
IsNull
437
if (editHandle.
IsNull
)
467
if (childHandle.
IsNull
592
|| dropDownHandle.
IsNull
System\Windows\Forms\Controls\DateTimePicker\DateTimePicker.cs (1)
1442
if (!c.hwndFound.
IsNull
)
System\Windows\Forms\Controls\ListView\ColumnHeader.cs (1)
396
if (!hwndHdr.
IsNull
)
System\Windows\Forms\Controls\ListView\ListView.cs (3)
2188
if (hwnd.
IsNull
)
3797
if (!header.
IsNull
)
4943
if (!headerWindow.
IsNull
)
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (1)
3385
if (!hWndParent.
IsNull
)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (3)
850
gotFocus = !PInvoke.SetFocus(this).
IsNull
;
2562
for (HWND hwnd = PInvokeCore.GetForegroundWindow(); !hwnd.
IsNull
; hwnd = PInvoke.GetParent(hwnd))
4915
if (!priorFocus.
IsNull
)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (2)
266
while (!hWnd.
IsNull
)
269
if (hWnd.
IsNull
)
System\Windows\Forms\Controls\TabControl\TabControl.cs (1)
1256
if (!tooltipHwnd.
IsNull
)
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (2)
172
if (!rootHwnd.
IsNull
)
581
if (!rootHwnd.
IsNull
&& !PInvoke.IsZoomed(rootHwnd))
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (3)
3999
if (!_hwndThatLostFocus.
IsNull
&& (_hwndThatLostFocus != Handle))
4431
if (thisHwndRoot == otherHwndRoot && !thisHwndRoot.
IsNull
)
4648
if (!rootHwnd.
IsNull
)
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.ModalMenuFilter.cs (4)
133
if (!hwndActive.
IsNull
)
188
if (!ActiveHwnd.Handle.
IsNull
)
403
if (!hwndActive.
IsNull
)
533
if (activeWindowHandle.Handle.
IsNull
)
System\Windows\Forms\Controls\WebBrowser\WebBrowser.cs (1)
1105
return !hwndFocus.
IsNull
&& PInvoke.IsChild(this, hwndFocus);
System\Windows\Forms\Controls\WebBrowser\WebBrowserSiteBase.cs (1)
192
if (!hwnd.
IsNull
)
System\Windows\Forms\Dialogs\CommonDialogs\FileDialog.cs (1)
565
if (!_dialogHWnd.
IsNull
)
System\Windows\Forms\Dialogs\TaskDialog\TaskDialog.cs (1)
917
bool isFirstNotification = _handle.
IsNull
;
System\Windows\Forms\Form.cs (4)
3415
if (icon is not null && !TaskbarOwner.Handle.
IsNull
)
3914
if (!ownerHandle.
IsNull
)
3970
desktop = !hWndOwner.
IsNull
? Screen.FromHandle(hWndOwner) : Screen.FromPoint(MousePosition);
5726
if (!captureHwnd.
IsNull
)
System\Windows\Forms\Internal\WinFormsUtils.cs (1)
155
if (hwnd.
IsNull
)
System\Windows\Forms\Layout\Containers\ContainerControl.cs (1)
629
if (focusHandle.
IsNull
|| FromChildHandle(focusHandle) != _activeControl)
System\Windows\Forms\NativeWindow.cs (12)
99
if (!handle.
IsNull
)
129
if (!HWND.
IsNull
)
136
if (!handle.
IsNull
&& ownedHandle)
238
Debug.Assert(!handle.
IsNull
, "Should never insert a zero handle into the hash");
299
Debug.Assert(!hwnd.
IsNull
);
409
if (!HWND.
IsNull
)
470
if (createResult.
IsNull
)
531
if (!HWND.
IsNull
)
615
if (!handle.
IsNull
&& handle != (HWND)(-1))
664
if (HWND.
IsNull
)
671
if (HWND.
IsNull
)
704
Debug.Assert(!hwnd.
IsNull
);
System\Windows\Forms\NativeWindow.WindowClass.cs (1)
44
Debug.Assert(!hwnd.
IsNull
, "Windows called us with an HWND of 0");
System\Windows\Forms\OLE\DropSource.cs (1)
93
if (!lastHwndTarget.
IsNull
&& (Cursor.Position is Point point))
System\Windows\Forms\Timer.cs (8)
208
public bool IsTimerRunning => _timerID != 0 && !HWND.
IsNull
;
212
if (HWND.
IsNull
)
230
Debug.Assert(!HWND.
IsNull
, "Could not create timer HWND.");
231
return !HWND.
IsNull
;
239
if (!hwnd.
IsNull
)
275
if (hwnd.
IsNull
)
290
if (_stoppingTimer || hwnd.
IsNull
|| !PInvoke.IsWindow(hwnd))
344
Debug.Assert(m.HWND == HWND && !HWND.
IsNull
, "Timer getting messages for other windows?");
System\Windows\Forms\ToolTip\ToolTip.cs (4)
1041
if (!hwndControl.
IsNull
)
1071
else if (found.
IsNull
)
1095
if (!hwnd.
IsNull
)
1534
if (!hwnd.
IsNull
)
System\Windows\Forms\UserControl.cs (1)
249
if (hwndFocus.
IsNull
)
System\Windows\Forms\VisualStyles\VisualStyleRenderer.cs (3)
226
if (!hwnd.
IsNull
)
253
if (!hwnd.
IsNull
)
584
if (!hwnd.
IsNull
&& ScaleHelper.IsThreadPerMonitorV2Aware)
System\Windows\Forms\WindowSubclassHandler.cs (1)
63
if (hwnd.
IsNull
)
System.Windows.Forms.Design (13)
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.FlyoutDialog.cs (3)
108
while (!hWnd.
IsNull
)
111
if (hWnd.
IsNull
)
145
if (!hWndCapture.
IsNull
)
System\ComponentModel\Design\DesignerActionUI.DesignerActionToolStripDropDown.cs (2)
201
while (!hWndDescendant.
IsNull
)
204
if (hWndDescendant.
IsNull
)
System\Drawing\Design\ColorEditor.ColorPalette.cs (1)
257
if (!hwndFocus.
IsNull
)
System\Drawing\Design\FontEditor.cs (1)
48
if (!hwndFocus.
IsNull
)
System\Drawing\Design\IconEditor.cs (1)
84
if (!hwndFocus.
IsNull
)
System\Drawing\Design\ImageEditor.cs (1)
113
if (!hwndFocus.
IsNull
)
System\Windows\Forms\Design\CommandSet.cs (1)
685
if (!hwnd.
IsNull
)
System\Windows\Forms\Design\ControlDesigner.cs (1)
2406
while (!hwndChild.
IsNull
)
System\Windows\Forms\Design\ImageListImageEditor.cs (1)
83
if (!hwndFocus.
IsNull
)
System\Windows\Forms\Design\ListViewDesigner.cs (1)
79
if (!hwndHit.
IsNull
&& hwndHit != listView.Handle)