Implemented interface member:
property
Handle
System.Windows.Forms.IWin32Window.Handle
84 references to Handle
System.Windows.Forms (35)
System\Windows\Forms\Accessibility\LabelEditAccessibleObject.cs (1)
21UseStdAccessibleObjects(labelEdit.Handle);
System\Windows\Forms\Accessibility\LabelEditNativeWindow.cs (2)
71public bool IsHandleCreated => Handle != HWND.Null; 120if (hwnd != Handle || idObject != (int)OBJECT_IDENTIFIER.OBJID_CLIENT || !IsAccessibilityObjectCreated)
System\Windows\Forms\Control.ControlNativeWindow.cs (1)
28WindowTarget.OnHandleChange(Handle);
System\Windows\Forms\Control.cs (3)
2130internal IntPtr HandleInternal => _window.Handle; 2213public bool IsHandleCreated => _window.Handle != 0; 9212if (_window.Handle == IntPtr.Zero)
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (11)
529&& ((_childEdit is not null && focus == _childEdit.Handle) || (_childListBox is not null && focus == _childListBox.Handle)); 1395if (DropDownStyle == ComboBoxStyle.Simple && m.HWnd == _childListBox!.Handle) 1414if (DropDownStyle == ComboBoxStyle.Simple && m.HWnd == _childListBox!.Handle) 1454if (DropDownStyle == ComboBoxStyle.Simple && m.HWnd == _childListBox!.Handle) 1479if (DropDownStyle == ComboBoxStyle.Simple && m.HWnd == _childListBox!.Handle) 1554if (!DesignMode && _childEdit is not null && m.HWnd == _childEdit.Handle) 1571if (_childEdit is not null && m.HWnd == _childEdit.Handle) 1751&& m.HWnd == _childEdit.Handle && PARAM.LOWORD(m.LParamInternal) == (int)PInvoke.HTCLIENT) 1815if (m.HWnd == _childEdit.Handle) 2895else if (_childEdit is not null && _childEdit.Handle != 0)
System\Windows\Forms\Controls\ListView\ListViewLabelEditAccessibleObject.cs (1)
21UseStdAccessibleObjects(labelEdit.Handle);
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (1)
673if (_dropDownOwnerWindow.Handle == IntPtr.Zero)
System\Windows\Forms\ErrorProvider\ErrorProvider.ControlItem.ControlItemAccessibleObject.cs (1)
90=> UIAHelper.WindowHandleToVariant(_window?.Handle ?? HWND.Null),
System\Windows\Forms\ErrorProvider\ErrorProvider.ErrorWindow.cs (2)
81if (Handle != 0) 113Parent = Handle,
System\Windows\Forms\ErrorProvider\ErrorProvider.ErrorWindow.ErrorWindowAccessibleObject.cs (2)
62UIA_PROPERTY_ID.UIA_NativeWindowHandlePropertyId => UIAHelper.WindowHandleToVariant(_owner.Handle), 119(int)_owner.Handle,
System\Windows\Forms\Form.cs (1)
1932if (_ownerWindow.Handle == IntPtr.Zero)
System\Windows\Forms\NativeWindow.cs (1)
388if (Handle != 0)
System\Windows\Forms\NotifyIcon.cs (5)
404if (_window is not null && _window.Handle != 0) 573if (_window.Handle == IntPtr.Zero) 578data.hWnd = _window.Handle; 646if (_window.Handle == IntPtr.Zero) 652data.hWnd = _window.Handle;
System\Windows\Forms\NotifyIcon.NotifyIconNativeWindow.cs (1)
29if (Handle != 0)
System\Windows\Forms\ToolTip\ToolTip.cs (2)
270return _window.Handle; 967internal bool GetHandleCreated() => _window is not null && _window.Handle != IntPtr.Zero;
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\ControlDesigner.ChildSubClass.cs (1)
53Debug.Assert(m.HWnd == Handle, "Message handle differs from target handle");
System.Windows.Forms.Tests (48)
System\Windows\Forms\AccessibleObjects\ListViewLabelEditAccessibleObjectTests.cs (2)
41Assert.Equal((int)labelEdit.Handle, (int)accessibilityObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_NativeWindowHandlePropertyId)); 85Assert.Equal(new int[] { AccessibleObject.RuntimeIDFirstItem, PARAM.ToInt(labelEdit.Handle) }, accessibilityObject.RuntimeId);
System\Windows\Forms\AccessibleObjects\TreeViewLabelEditAccessibleObjectTests.cs (2)
40Assert.Equal((int)labelEdit.Handle, (int)accessibilityObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_NativeWindowHandlePropertyId)); 84Assert.Equal(new int[] { AccessibleObject.RuntimeIDFirstItem, PARAM.ToInt(labelEdit.Handle) }, accessibilityObject.RuntimeId);
System\Windows\Forms\ControlTests.Methods.cs (6)
1966IntPtr handle = window.Handle; 1989Assert.Same(parent, Control.FromChildHandle(window.Handle)); 1993Assert.Null(Control.FromChildHandle(window.Handle)); 2021IntPtr handle = window.Handle; 2044Assert.Null(Control.FromHandle(window.Handle)); 2048Assert.Null(Control.FromHandle(window.Handle));
System\Windows\Forms\NativeWindowTests.cs (38)
16Assert.Equal(IntPtr.Zero, window.Handle); 25Assert.Equal(control.Handle, window.Handle); 38Assert.Equal(control.Handle, window1.Handle); 44Assert.Equal(control.Handle, window1.Handle); 45Assert.Equal(control.Handle, window2.Handle); 54Assert.Equal(control.Handle, window.Handle); 57Assert.Equal(IntPtr.Zero, window.Handle); 60Assert.Equal(control.Handle, window.Handle); 70Assert.Equal(IntPtr.Zero, window.Handle); 81Assert.Equal(250, window.Handle); 91Assert.Equal(control.Handle, window.Handle); 93Assert.Equal(control.Handle, window.Handle); 111Assert.NotEqual(IntPtr.Zero, window1.Handle); 119Assert.NotEqual(IntPtr.Zero, window2.Handle); 120Assert.NotEqual(window1.Handle, window2.Handle); 154Assert.NotEqual(IntPtr.Zero, window.Handle); 168Assert.Equal(IntPtr.Zero, window.Handle); 177IntPtr handle = window.Handle; 181Assert.Equal(handle, window.Handle); 195Assert.Equal(IntPtr.Zero, window.Handle); 209Assert.NotEqual(IntPtr.Zero, window1.Handle); 217Assert.Equal(IntPtr.Zero, window2.Handle); 232Assert.Equal(IntPtr.Zero, window.Handle); 242Assert.Equal(IntPtr.Zero, window.Handle); 253Assert.Equal(IntPtr.Zero, window.Handle); 262Assert.Equal(IntPtr.Zero, window.Handle); 282Assert.NotEqual(IntPtr.Zero, window.Handle); 308Assert.Equal(control.Handle, window.Handle); 333Assert.Equal(250, window.Handle); 366window2.AssignHandle(window1.Handle); 376window3.AssignHandle(window1.Handle); 410Assert.Equal(IntPtr.Zero, window.Handle); 420Assert.Equal(IntPtr.Zero, window.Handle); 432Assert.Equal(IntPtr.Zero, window.Handle); 441Assert.Equal(IntPtr.Zero, window.Handle); 487Assert.Equal(control.Handle, window.Handle); 512Assert.Equal(250, window.Handle);