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)
21
UseStdAccessibleObjects(labelEdit.
Handle
);
System\Windows\Forms\Accessibility\LabelEditNativeWindow.cs (2)
71
public bool IsHandleCreated =>
Handle
!= HWND.Null;
120
if (hwnd !=
Handle
|| idObject != (int)OBJECT_IDENTIFIER.OBJID_CLIENT || !IsAccessibilityObjectCreated)
System\Windows\Forms\Control.ControlNativeWindow.cs (1)
28
WindowTarget.OnHandleChange(
Handle
);
System\Windows\Forms\Control.cs (3)
2131
internal IntPtr HandleInternal => _window.
Handle
;
2214
public bool IsHandleCreated => _window.
Handle
!= 0;
9173
if (_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
));
1394
if (DropDownStyle == ComboBoxStyle.Simple && m.HWnd == _childListBox!.
Handle
)
1413
if (DropDownStyle == ComboBoxStyle.Simple && m.HWnd == _childListBox!.
Handle
)
1453
if (DropDownStyle == ComboBoxStyle.Simple && m.HWnd == _childListBox!.
Handle
)
1478
if (DropDownStyle == ComboBoxStyle.Simple && m.HWnd == _childListBox!.
Handle
)
1553
if (!DesignMode && _childEdit is not null && m.HWnd == _childEdit.
Handle
)
1570
if (_childEdit is not null && m.HWnd == _childEdit.
Handle
)
1750
&& m.HWnd == _childEdit.
Handle
&& PARAM.LOWORD(m.LParamInternal) == (int)PInvoke.HTCLIENT)
1814
if (m.HWnd == _childEdit.
Handle
)
2894
else if (_childEdit is not null && _childEdit.
Handle
!= 0)
System\Windows\Forms\Controls\ListView\ListViewLabelEditAccessibleObject.cs (1)
21
UseStdAccessibleObjects(labelEdit.
Handle
);
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (1)
676
if (_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)
80
if (
Handle
!= 0)
112
Parent =
Handle
,
System\Windows\Forms\ErrorProvider\ErrorProvider.ErrorWindow.ErrorWindowAccessibleObject.cs (2)
62
UIA_PROPERTY_ID.UIA_NativeWindowHandlePropertyId => UIAHelper.WindowHandleToVariant(_owner.
Handle
),
119
(int)_owner.
Handle
,
System\Windows\Forms\Form.cs (1)
1932
if (_ownerWindow.
Handle
== IntPtr.Zero)
System\Windows\Forms\NativeWindow.cs (1)
388
if (
Handle
!= 0)
System\Windows\Forms\NotifyIcon.cs (5)
404
if (_window is not null && _window.
Handle
!= 0)
573
if (_window.
Handle
== IntPtr.Zero)
578
data.hWnd = _window.
Handle
;
646
if (_window.
Handle
== IntPtr.Zero)
652
data.hWnd = _window.
Handle
;
System\Windows\Forms\NotifyIcon.NotifyIconNativeWindow.cs (1)
29
if (
Handle
!= 0)
System\Windows\Forms\ToolTip\ToolTip.cs (2)
270
return _window.
Handle
;
967
internal bool GetHandleCreated() => _window is not null && _window.
Handle
!= IntPtr.Zero;
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\ControlDesigner.ChildSubClass.cs (1)
53
Debug.Assert(m.HWnd ==
Handle
, "Message handle differs from target handle");
System.Windows.Forms.Tests (48)
System\Windows\Forms\AccessibleObjects\ListViewLabelEditAccessibleObjectTests.cs (2)
39
Assert.Equal((int)labelEdit.
Handle
, (int)accessibilityObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_NativeWindowHandlePropertyId));
83
Assert.Equal(new int[] { AccessibleObject.RuntimeIDFirstItem, PARAM.ToInt(labelEdit.
Handle
) }, accessibilityObject.RuntimeId);
System\Windows\Forms\AccessibleObjects\TreeViewLabelEditAccessibleObjectTests.cs (2)
38
Assert.Equal((int)labelEdit.
Handle
, (int)accessibilityObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_NativeWindowHandlePropertyId));
82
Assert.Equal(new int[] { AccessibleObject.RuntimeIDFirstItem, PARAM.ToInt(labelEdit.
Handle
) }, accessibilityObject.RuntimeId);
System\Windows\Forms\ControlTests.Methods.cs (6)
1997
IntPtr handle = window.
Handle
;
2020
Assert.Same(parent, Control.FromChildHandle(window.
Handle
));
2024
Assert.Null(Control.FromChildHandle(window.
Handle
));
2052
IntPtr handle = window.
Handle
;
2075
Assert.Null(Control.FromHandle(window.
Handle
));
2079
Assert.Null(Control.FromHandle(window.
Handle
));
System\Windows\Forms\NativeWindowTests.cs (38)
14
Assert.Equal(IntPtr.Zero, window.
Handle
);
23
Assert.Equal(control.Handle, window.
Handle
);
36
Assert.Equal(control.Handle, window1.
Handle
);
42
Assert.Equal(control.Handle, window1.
Handle
);
43
Assert.Equal(control.Handle, window2.
Handle
);
52
Assert.Equal(control.Handle, window.
Handle
);
55
Assert.Equal(IntPtr.Zero, window.
Handle
);
58
Assert.Equal(control.Handle, window.
Handle
);
68
Assert.Equal(IntPtr.Zero, window.
Handle
);
79
Assert.Equal(250, window.
Handle
);
89
Assert.Equal(control.Handle, window.
Handle
);
91
Assert.Equal(control.Handle, window.
Handle
);
109
Assert.NotEqual(IntPtr.Zero, window1.
Handle
);
117
Assert.NotEqual(IntPtr.Zero, window2.
Handle
);
118
Assert.NotEqual(window1.
Handle
, window2.
Handle
);
152
Assert.NotEqual(IntPtr.Zero, window.
Handle
);
166
Assert.Equal(IntPtr.Zero, window.
Handle
);
175
IntPtr handle = window.
Handle
;
179
Assert.Equal(handle, window.
Handle
);
193
Assert.Equal(IntPtr.Zero, window.
Handle
);
207
Assert.NotEqual(IntPtr.Zero, window1.
Handle
);
215
Assert.Equal(IntPtr.Zero, window2.
Handle
);
230
Assert.Equal(IntPtr.Zero, window.
Handle
);
240
Assert.Equal(IntPtr.Zero, window.
Handle
);
251
Assert.Equal(IntPtr.Zero, window.
Handle
);
260
Assert.Equal(IntPtr.Zero, window.
Handle
);
280
Assert.NotEqual(IntPtr.Zero, window.
Handle
);
306
Assert.Equal(control.Handle, window.
Handle
);
331
Assert.Equal(250, window.
Handle
);
364
window2.AssignHandle(window1.
Handle
);
374
window3.AssignHandle(window1.
Handle
);
408
Assert.Equal(IntPtr.Zero, window.
Handle
);
418
Assert.Equal(IntPtr.Zero, window.
Handle
);
430
Assert.Equal(IntPtr.Zero, window.
Handle
);
439
Assert.Equal(IntPtr.Zero, window.
Handle
);
485
Assert.Equal(control.Handle, window.
Handle
);
510
Assert.Equal(250, window.
Handle
);