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