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)
2131internal IntPtr HandleInternal => _window.Handle; 2214public bool IsHandleCreated => _window.Handle != 0; 9173if (_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)); 1394if (DropDownStyle == ComboBoxStyle.Simple && m.HWnd == _childListBox!.Handle) 1413if (DropDownStyle == ComboBoxStyle.Simple && m.HWnd == _childListBox!.Handle) 1453if (DropDownStyle == ComboBoxStyle.Simple && m.HWnd == _childListBox!.Handle) 1478if (DropDownStyle == ComboBoxStyle.Simple && m.HWnd == _childListBox!.Handle) 1553if (!DesignMode && _childEdit is not null && m.HWnd == _childEdit.Handle) 1570if (_childEdit is not null && m.HWnd == _childEdit.Handle) 1750&& m.HWnd == _childEdit.Handle && PARAM.LOWORD(m.LParamInternal) == (int)PInvoke.HTCLIENT) 1814if (m.HWnd == _childEdit.Handle) 2894else 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)
676if (_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)
80if (Handle != 0) 112Parent = 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)
39Assert.Equal((int)labelEdit.Handle, (int)accessibilityObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_NativeWindowHandlePropertyId)); 83Assert.Equal(new int[] { AccessibleObject.RuntimeIDFirstItem, PARAM.ToInt(labelEdit.Handle) }, accessibilityObject.RuntimeId);
System\Windows\Forms\AccessibleObjects\TreeViewLabelEditAccessibleObjectTests.cs (2)
38Assert.Equal((int)labelEdit.Handle, (int)accessibilityObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_NativeWindowHandlePropertyId)); 82Assert.Equal(new int[] { AccessibleObject.RuntimeIDFirstItem, PARAM.ToInt(labelEdit.Handle) }, accessibilityObject.RuntimeId);
System\Windows\Forms\ControlTests.Methods.cs (6)
1997IntPtr handle = window.Handle; 2020Assert.Same(parent, Control.FromChildHandle(window.Handle)); 2024Assert.Null(Control.FromChildHandle(window.Handle)); 2052IntPtr handle = window.Handle; 2075Assert.Null(Control.FromHandle(window.Handle)); 2079Assert.Null(Control.FromHandle(window.Handle));
System\Windows\Forms\NativeWindowTests.cs (38)
14Assert.Equal(IntPtr.Zero, window.Handle); 23Assert.Equal(control.Handle, window.Handle); 36Assert.Equal(control.Handle, window1.Handle); 42Assert.Equal(control.Handle, window1.Handle); 43Assert.Equal(control.Handle, window2.Handle); 52Assert.Equal(control.Handle, window.Handle); 55Assert.Equal(IntPtr.Zero, window.Handle); 58Assert.Equal(control.Handle, window.Handle); 68Assert.Equal(IntPtr.Zero, window.Handle); 79Assert.Equal(250, window.Handle); 89Assert.Equal(control.Handle, window.Handle); 91Assert.Equal(control.Handle, window.Handle); 109Assert.NotEqual(IntPtr.Zero, window1.Handle); 117Assert.NotEqual(IntPtr.Zero, window2.Handle); 118Assert.NotEqual(window1.Handle, window2.Handle); 152Assert.NotEqual(IntPtr.Zero, window.Handle); 166Assert.Equal(IntPtr.Zero, window.Handle); 175IntPtr handle = window.Handle; 179Assert.Equal(handle, window.Handle); 193Assert.Equal(IntPtr.Zero, window.Handle); 207Assert.NotEqual(IntPtr.Zero, window1.Handle); 215Assert.Equal(IntPtr.Zero, window2.Handle); 230Assert.Equal(IntPtr.Zero, window.Handle); 240Assert.Equal(IntPtr.Zero, window.Handle); 251Assert.Equal(IntPtr.Zero, window.Handle); 260Assert.Equal(IntPtr.Zero, window.Handle); 280Assert.NotEqual(IntPtr.Zero, window.Handle); 306Assert.Equal(control.Handle, window.Handle); 331Assert.Equal(250, window.Handle); 364window2.AssignHandle(window1.Handle); 374window3.AssignHandle(window1.Handle); 408Assert.Equal(IntPtr.Zero, window.Handle); 418Assert.Equal(IntPtr.Zero, window.Handle); 430Assert.Equal(IntPtr.Zero, window.Handle); 439Assert.Equal(IntPtr.Zero, window.Handle); 485Assert.Equal(control.Handle, window.Handle); 510Assert.Equal(250, window.Handle);