43 references to FromHandle
PresentationUI (1)
MS\Internal\Documents\PeoplePickerWrapper.cs (1)
270System.Windows.Forms.Control.FromHandle(hWndParent) as RMPublishingDialog;
System.Windows.Forms (33)
System\Windows\Forms\Application.ModalApplicationContext.cs (1)
32parentControl = Control.FromHandle(parentHandle);
System\Windows\Forms\Application.ThreadWindows.cs (2)
35if (!_onlyWinForms || Control.FromHandle(hwnd) is not null) 51Control.FromHandle(hwnd)?.Dispose();
System\Windows\Forms\Control.cs (8)
5214Control? control = FromHandle(hwnd); 5457Control? ctl = FromHandle(hWndChild); 9332&& (FromHandle(parentHandle) is null || _parent is null) 9400if (FromHandle(hWnd) is not { } control) 10947Control? previousControl = FromHandle(hWnd); 10986ReflectParent = FromHandle(parentHandle); 11231Control? control = FromHandle(m.LParamInternal); 11797if (!handle.IsNull && FromHandle(handle) is { } control)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (2)
3848Control? focusedControl = FromHandle(PInvoke.GetFocus()); 3855focusedControl = FromHandle(PInvoke.GetFocus());
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.MouseHook.cs (1)
165&& FromHandle(hwnd) is Control targetControl
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (1)
4007Control? control = FromHandle(_hwndThatLostFocus);
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (2)
838if (Control.FromHandle(rootWindowOfControl) is Form mainForm && mainForm.IsMdiContainer) 881Control? intendedControl = Control.FromHandle(m.HWnd);
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.ModalMenuFilter.cs (6)
88control = Control.FromHandle(_activeHwnd.Handle); 98control = Control.FromHandle(_activeHwnd.Handle); 141ActiveHwndInternal = new(Control.FromHandle(hwndActive), hwndActive); 197Control? control = Control.FromHandle(ActiveHwnd.Handle); 267if (Control.FromHandle(m.HWnd) is ToolStrip toolStrip && !toolStrip.IsDropDown) 414ActiveHwndInternal = new(Control.FromHandle(hwndActive), hwndActive);
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (1)
1156containerControl = FromHandle(PInvoke.GetParent(this)) as ContainerControl;
System\Windows\Forms\Form.cs (2)
287public static Form? ActiveForm => FromHandle(PInvokeCore.GetForegroundWindow()) as Form; 316mdiChild = FromHandle(hwnd) as Form;
System\Windows\Forms\Internal\WinFormsUtils.cs (1)
164Control? c = Control.FromHandle(hwnd);
System\Windows\Forms\ToolTip\KeyboardToolTipStateMachine.cs (1)
154return Control.FromHandle(PInvoke.GetFocus());
System\Windows\Forms\ToolTip\ToolTip.cs (5)
1039Control? currentControl = Control.FromHandle(hwndControl); 1073current = Control.FromHandle(found); 1093Control? control = Control.FromHandle(hwnd); 1973return _owners.TryGetValue(hwnd, out Control? control) ? control : Control.FromHandle(hwnd); 2340Control? control = window as Control ?? Control.FromHandle(window.Handle);
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\ControlDesigner.cs (1)
2414Control? child = Control.FromHandle(hwndChild);
System.Windows.Forms.Tests (8)
System\Windows\Forms\ControlTests.Methods.cs (8)
2009Assert.Same(control, Control.FromHandle(handle)); 2013Assert.Null(Control.FromHandle(handle)); 2023Assert.Null(Control.FromHandle(handle)); 2027Assert.Null(Control.FromHandle(handle)); 2044Assert.Null(Control.FromHandle(window.Handle)); 2048Assert.Null(Control.FromHandle(window.Handle)); 2054Assert.Null(Control.FromHandle(IntPtr.Zero)); 2055Assert.Null(Control.FromHandle(1));