Implemented interface member:
property
Handle
System.Windows.Forms.IWin32Window.Handle
107 references to Handle
PresentationUI (5)
MS\Internal\Documents\RMPublishingDialog.cs (1)
687
String[] userNames = picker.Show(this.
Handle
);
MS\Internal\Documents\SignatureSummaryDialog.cs (4)
340
_documentSignatureManager.OnSign(null, this.
Handle
);
361
this.
Handle
);
368
_documentSignatureManager.OnSign(null, this.
Handle
);
387
this.
Handle
);
System.Windows.Forms (49)
System\Windows\Forms\Accessibility\Control.ControlAccessibleObject.cs (2)
45
Handle = ownerControl.
Handle
;
231
/// the <see cref="Control.
Handle
"/> property of the <see cref="Owner"/> it is associated with.
System\Windows\Forms\ActiveX\AxHost.cs (1)
814
private HWND GetHandleNoCreate() => IsHandleCreated ? (HWND)
Handle
: default;
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (1)
760
*phwnd = (HWND)_control.
Handle
;
System\Windows\Forms\Application.cs (1)
1252
cp.Parent = threadContext.GetParkingWindow(dpiAwarenessContext).
Handle
;
System\Windows\Forms\Control.cs (7)
1312
return !focusHwnd.IsNull && (focusHwnd ==
Handle
|| PInvoke.IsChild(this, focusHwnd));
2356
internal HWND InternalHandle => !IsHandleCreated ? default : (HWND)
Handle
;
4545
return Graphics.FromHwndInternal(
Handle
);
5782
/// Return <see cref="
Handle
"/> if <paramref name="window"/> is a <see cref="Control"/>.
7370
IntPtr handle =
Handle
;
10270
Debug.Assert(
Handle
!= value, "Cycle created in SetParentHandle");
12954
internal HWND HWND => (HWND)
Handle
;
System\Windows\Forms\Control.Ime.cs (4)
90
return ImeContext.GetImeMode(
Handle
);
353
ImeContext.SetImeStatus(newImeContextMode,
Handle
);
600
OnImeContextStatusChanged(
Handle
);
659
ImeContext.SetImeStatus(PropagatingImeMode, topMostWinformsParent.
Handle
);
System\Windows\Forms\Controls\DataGridView\DataGridViewBand.cs (1)
638
_ = DataGridView.
Handle
;
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (2)
1267
h = comboBox.ParentInternal.
Handle
;
1270
h = comboBox.
Handle
; // make sure that assigning the DataSource property does not assert.
System\Windows\Forms\Controls\DateTimePicker\DateTimePicker.cs (1)
1531
if (m.HWnd ==
Handle
)
System\Windows\Forms\Controls\Labels\LinkLabel.Link.LinkAccessibleObject.cs (1)
37
using Graphics graphics = Graphics.FromHwnd(_owningLink.Owner.
Handle
);
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (1)
2185
if (m.HWnd ==
Handle
)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\DropDownButton.DropDownButtonAccessibleObject.cs (1)
32
UseStdAccessibleObjects(owningDropDownButton.
Handle
);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (2)
2564
if (hwnd == _dropDownHolder.
Handle
)
5270
if (nmhdr->hwndFrom == ToolTip.
Handle
)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (1)
77
cp.Parent = _gridView.ParentInternal.
Handle
;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.GridViewTextBox.cs (1)
294
if (nmhdr->hwndFrom == PropertyGridView.ToolTip.
Handle
)
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (4)
3211
if (m.LParamInternal ==
Handle
&& !GetState(States.CreatingHandle))
3234
if (m.HWnd !=
Handle
)
3435
if (
Handle
== m.HWND
3443
using Graphics g = Graphics.FromHwndInternal(
Handle
);
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (3)
3999
if (!_hwndThatLostFocus.IsNull && (_hwndThatLostFocus !=
Handle
))
4406
if (Focused && (otherHwnd !=
Handle
))
4424
if ((
Handle
!= otherHwnd) && !PInvoke.IsChild(this, otherHwnd))
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.ToolStripItemAccessibleObject.cs (1)
94
/// <see cref="Control.
Handle
" /> is not.
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.ModalMenuFilter.cs (1)
629
m.HWnd = activeToolStrip.
Handle
;
System\Windows\Forms\Controls\TreeView\TreeNodeCollection.cs (2)
48
if (value._treeView is not null && value._treeView.
Handle
!= tv.
Handle
)
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (1)
581
internal IntPtr GetHandleNoCreate() => IsHandleCreated ?
Handle
: IntPtr.Zero;
System\Windows\Forms\ErrorProvider\ErrorProvider.ErrorWindow.cs (1)
100
Parent = _parent.
Handle
System\Windows\Forms\Form.cs (3)
4712
if (_ctlClient is not null && _ctlClient.
Handle
!= IntPtr.Zero &&
4941
callback?.SetOwners(
Handle
);
5743
if (PInvokeCore.GetWindowLong(ownerHwnd.Handle, WINDOW_LONG_PTR_INDEX.GWL_HWNDPARENT) ==
Handle
)
System\Windows\Forms\MDI\MDIClient.cs (3)
140
if (
Handle
== IntPtr.Zero)
169
if (site is not null && site.DesignMode &&
Handle
!= IntPtr.Zero)
329
if (ParentInternal is not null && ParentInternal.Site is not null && ParentInternal.Site.DesignMode &&
Handle
!= IntPtr.Zero)
System\Windows\Forms\Screen.cs (1)
269
return FromHandle(control.
Handle
);
System\Windows\Forms\SendKeys\SendKeys.cs (1)
923
ParseKeys(keys, (control is not null) ? (HWND)control.
Handle
: default);
System\Windows\Forms\ToolTip\ToolTip.cs (1)
198
cp.Parent = TopLevelControl.
Handle
;
System.Windows.Forms.Design (40)
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (1)
80
using (GetDcScope hdc = new((HWND)listBox.
Handle
))
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.FlyoutDialog.cs (3)
69
cp.Parent = _parentControl.
Handle
;
116
if (hWnd == (HWND)
Handle
)
141
PInvokeCore.SetWindowLong(this, WINDOW_LONG_PTR_INDEX.GWL_HWNDPARENT, parent.
Handle
);
System\ComponentModel\Design\DesignerActionUI.cs (1)
750
if (_designerActionHost is not null && _designerActionHost.
Handle
!= 0 && _designerActionHost.Visible)
System\ComponentModel\Design\DesignerActionUI.DesignerActionToolStripDropDown.cs (5)
57
if (focusedControl ==
Handle
)
63
if (CurrentPanel is not null && CurrentPanel.
Handle
== focusedControl)
90
if (
Handle
== hwndActivating && e.CloseReason == ToolStripDropDownCloseReason.AppClicked)
94
else if (WindowOwnsWindow((HWND)
Handle
, hwndActivating))
229
_cancelClose = WindowOwnsWindow((HWND)
Handle
, hwndActivating);
System\ComponentModel\Design\ObjectSelectorEditor.cs (1)
67
HWND hwnd = (HWND)treeView.
Handle
;
System\Windows\Forms\Design\Behavior\BehaviorService.AdornerWindow.MouseHook.cs (1)
163
|| (hwnd != adornerWindow.DesignerFrame.
Handle
&& PInvoke.IsChild(adornerWindow.DesignerFrame, hwnd)))
System\Windows\Forms\Design\Behavior\BehaviorService.cs (1)
707
hwndTrack = (HWND)_adornerWindow.
Handle
,
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (1)
545
_dragOffset = _behaviorService.MapAdornerWindowPoint(rootControl.
Handle
, Point.Empty);
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (1)
881
_parentLocation = bhvSvc.MapAdornerWindowPoint(parentControl.
Handle
, Point.Empty);
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (1)
622
controlBounds.Location = _behaviorService.MapAdornerWindowPoint(targetControl.Parent.
Handle
, controlBounds.Location);
System\Windows\Forms\Design\Behavior\ToolboxItemSnapLineBehavior.cs (1)
342
Point adornerServiceOrigin = _behaviorService.MapAdornerWindowPoint(baseControl.
Handle
, new Point(0, 0));
System\Windows\Forms\Design\ControlCommandSet.cs (2)
1753
return PARAM.ToInt(cX.Parent.
Handle
) - PARAM.ToInt(cY.Parent.
Handle
);
System\Windows\Forms\Design\ControlDesigner.cs (4)
896
HookChildHandles((HWND)child.
Handle
);
918
HookChildHandles((HWND)child.
Handle
);
1811
if (m.HWnd == Control.
Handle
)
2080
if (m.HWnd != Control.
Handle
)
System\Windows\Forms\Design\DesignerFrame.cs (2)
318
ThemedScrollbarWindow windowInfo = new() { Handle = c.
Handle
};
502
if (c.IsHandleCreated && m.LParamInternal == c.
Handle
)
System\Windows\Forms\Design\DesignerUtils.cs (3)
388
using GetDcScope controlDC = new((HWND)control.
Handle
);
834
HWND hwnd = (HWND)treeView.
Handle
;
849
HWND hwnd = (HWND)listView.
Handle
;
System\Windows\Forms\Design\ListViewDesigner.cs (3)
64
HookChildHandles((HWND)Control.
Handle
);
79
if (!hwndHit.IsNull && hwndHit != listView.
Handle
)
108
HookChildHandles((HWND)Control.
Handle
);
System\Windows\Forms\Design\OleDragDropHandler.cs (2)
381
DrawReversibleFrame((HWND)parentControl.
Handle
, newRect, backColor);
402
DrawReversibleFrame((HWND)parentControl.
Handle
, newRect, backColor);
System\Windows\Forms\Design\RichTextBoxDesigner.cs (2)
31
if (control is not null && control.
Handle
!= IntPtr.Zero)
33
PInvokeCore.RevokeDragDrop((HWND)control.
Handle
);
System\Windows\Forms\Design\TabControlDesigner.cs (1)
375
_ = e.Control.
Handle
;
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (1)
1069
Point loc = BehaviorService.MapAdornerWindowPoint(Table.
Handle
, Table.DisplayRectangle.Location);
System\Windows\Forms\Design\ToolStripInSituService.cs (2)
206
hWnd = (_toolDesigner.Editor.EditBox.Visible) ? _toolDesigner.Editor.EditBox.
Handle
: hWnd;
210
hWnd = (_toolItemDesigner.Editor.EditBox.Visible) ? _toolItemDesigner.Editor.EditBox.
Handle
: hWnd;
System\Windows\Forms\Design\ToolStripTemplateNode.cs (1)
1504
if (hWnd == _parent.
Handle
)
WindowsFormsIntegration (13)
System\Windows\Integration\ElementHost.cs (5)
224
return (focusHandle == this.
Handle
|| (this.HwndSource != null && focusHandle == this.HwndSource.Handle));
571
ParentWindow =
Handle
,
594
if (wParam !=
Handle
)
608
UnsafeNativeMethods.SendMessage(new HandleRef(this, this.
Handle
), msg, wParam, lParam);
759
UnsafeNativeMethods.SendMessage(new HandleRef(this, this.
Handle
), msg, wParam, lParam);
System\Windows\Integration\WindowsFormsHost.cs (8)
97
SWF.ImeContext.Enable(this.Child.
Handle
);
104
SWF.ImeContext.Disable(this.Child.
Handle
);
484
UnsafeNativeMethods.SetParent(/* child = */ HostContainerInternal.
Handle
, /* parent = */ _hwndParent.Handle);
485
return new HandleRef(HostContainerInternal, HostContainerInternal.
Handle
);
747
_focusTarget.
Handle
!= _prevFocusHwnd &&
748
UnsafeNativeMethods.IsChild(
Handle
, _prevFocusHwnd) &&
749
!UnsafeNativeMethods.IsChild(
Handle
, focusHwnd))
962
if (UnsafeNativeMethods.SendMessage(new HandleRef(this, this.
Handle
),