126 references to IsNull
System.Drawing.Common.Tests (1)
Helpers.cs (1)
132
if (hwnd.
IsNull
)
System.Windows.Forms (110)
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)
3209
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)
361
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)
1312
return !focusHwnd.
IsNull
&& (focusHwnd == Handle || PInvoke.IsChild(this, focusHwnd));
2273
while (!parentHandle.
IsNull
)
2344
!(next = PInvoke.GetWindow(prev, GET_WINDOW_CMD.GW_HWNDPREV)).
IsNull
;
5233
while (!hwnd.
IsNull
)
5475
!hWndChild.
IsNull
;
5802
return hwnd.
IsNull
|| PInvoke.IsWindow(hwnd)
7089
if (PInvoke.SetParent(this, parent).
IsNull
)
9105
PInvoke.GetParent(topMostParent).
IsNull
? PInvokeCore.WM_CHANGEUISTATE : PInvokeCore.WM_UPDATEUISTATE,
9349
!parentHandle.
IsNull
9447
if (!handle.
IsNull
)
10271
if (parentHandle != value || (parentHandle.
IsNull
&& !topLevel))
10275
bool recreate = (parentHandle.
IsNull
&& !topLevel)
10276
|| (value.
IsNull
&& topLevel);
10301
if (value.
IsNull
)
10308
if (PInvoke.SetParent(this, value).
IsNull
)
10321
else if (value.
IsNull
&& parentHandle.
IsNull
&& topLevel)
10326
if (PInvoke.SetParent(this, HWND.Null).
IsNull
)
10961
while (!(hWnd = PInvoke.GetWindow(hWnd, GET_WINDOW_CMD.GW_HWNDPREV)).
IsNull
)
11000
if (!parentHandle.
IsNull
)
11145
while (!parentHandle.
IsNull
)
11157
if (!lastParentHandle.
IsNull
)
11797
if (dialogItem.
IsNull
)
11813
if (!handle.
IsNull
&& FromHandle(handle) is { } control)
12044
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)
542
return !focus.
IsNull
1881
if (_childEdit is not null && !_childEdit.HWND.
IsNull
)
1886
if (_childListBox is not null && !_childListBox.HWND.
IsNull
)
2297
if (!hwnd.
IsNull
)
3345
if (_dropDownHandle.
IsNull
)
3439
if (_childEdit is not null && !_childEdit.HWND.
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
)
3795
if (!header.
IsNull
)
4941
if (!headerWindow.
IsNull
)
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (1)
3341
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)
1259
if (!tooltipHwnd.
IsNull
)
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (2)
164
if (!rootHwnd.
IsNull
)
573
if (!rootHwnd.
IsNull
&& !PInvoke.IsZoomed(rootHwnd))
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (3)
4005
if (!_hwndThatLostFocus.
IsNull
&& (_hwndThatLostFocus != Handle))
4437
if (thisHwndRoot == otherHwndRoot && !thisHwndRoot.
IsNull
)
4614
if (!rootHwnd.
IsNull
)
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.ModalMenuFilter.cs (4)
139
if (!hwndActive.
IsNull
)
194
if (!ActiveHwnd.Handle.
IsNull
)
412
if (!hwndActive.
IsNull
)
542
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)
3412
if (icon is not null && !TaskbarOwner.Handle.
IsNull
)
3905
if (!ownerHandle.
IsNull
)
3961
desktop = !hWndOwner.
IsNull
? Screen.FromHandle(hWndOwner) : Screen.FromPoint(MousePosition);
5710
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)
1037
if (!hwndControl.
IsNull
)
1067
else if (found.
IsNull
)
1091
if (!hwnd.
IsNull
)
1530
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)
691
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)
System.Windows.Forms.Primitives.TestUtilities (2)
Win32\Window.cs (1)
44
if (!Handle.
IsNull
)
Win32\WindowClass.cs (1)
198
if (window.
IsNull
)