43 references to FromHandle
PresentationUI (1)
MS\Internal\Documents\PeoplePickerWrapper.cs (1)
270
System.Windows.Forms.Control.
FromHandle
(hWndParent) as RMPublishingDialog;
System.Windows.Forms (33)
System\Windows\Forms\Application.ModalApplicationContext.cs (1)
32
parentControl = Control.
FromHandle
(parentHandle);
System\Windows\Forms\Application.ThreadWindows.cs (2)
35
if (!_onlyWinForms || Control.
FromHandle
(hwnd) is not null)
51
Control.
FromHandle
(hwnd)?.Dispose();
System\Windows\Forms\Control.cs (8)
5228
Control? control =
FromHandle
(hwnd);
5471
Control? ctl =
FromHandle
(hWndChild);
9346
&& (
FromHandle
(parentHandle) is null || _parent is null)
9413
if (
FromHandle
(hWnd) is not { } control)
10958
Control? previousControl =
FromHandle
(hWnd);
10997
ReflectParent =
FromHandle
(parentHandle);
11242
Control? control =
FromHandle
(m.LParamInternal);
11808
if (!handle.IsNull &&
FromHandle
(handle) is { } control)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (2)
3871
Control? focusedControl =
FromHandle
(PInvoke.GetFocus());
3878
focusedControl =
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)
4001
Control? control =
FromHandle
(_hwndThatLostFocus);
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (2)
838
if (Control.
FromHandle
(rootWindowOfControl) is Form mainForm && mainForm.IsMdiContainer)
881
Control? intendedControl = Control.
FromHandle
(m.HWnd);
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.ModalMenuFilter.cs (6)
88
control = Control.
FromHandle
(_activeHwnd.Handle);
95
control = Control.
FromHandle
(_activeHwnd.Handle);
135
ActiveHwndInternal = new(Control.
FromHandle
(hwndActive), hwndActive);
191
Control? control = Control.
FromHandle
(ActiveHwnd.Handle);
258
if (Control.
FromHandle
(m.HWnd) is ToolStrip toolStrip && !toolStrip.IsDropDown)
405
ActiveHwndInternal = new(Control.
FromHandle
(hwndActive), hwndActive);
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (1)
1150
containerControl =
FromHandle
(PInvoke.GetParent(this)) as ContainerControl;
System\Windows\Forms\Form.cs (2)
286
public static Form? ActiveForm =>
FromHandle
(PInvokeCore.GetForegroundWindow()) as Form;
315
mdiChild =
FromHandle
(hwnd) as Form;
System\Windows\Forms\Internal\WinFormsUtils.cs (1)
164
Control? c = Control.
FromHandle
(hwnd);
System\Windows\Forms\ToolTip\KeyboardToolTipStateMachine.cs (1)
154
return Control.
FromHandle
(PInvoke.GetFocus());
System\Windows\Forms\ToolTip\ToolTip.cs (5)
1039
Control? currentControl = Control.
FromHandle
(hwndControl);
1073
current = Control.
FromHandle
(found);
1093
Control? control = Control.
FromHandle
(hwnd);
1967
return _owners.TryGetValue(hwnd, out Control? control) ? control : Control.
FromHandle
(hwnd);
2334
Control? control = window as Control ?? Control.
FromHandle
(window.Handle);
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\ControlDesigner.cs (1)
2414
Control? child = Control.
FromHandle
(hwndChild);
System.Windows.Forms.Tests (8)
System\Windows\Forms\ControlTests.Methods.cs (8)
2009
Assert.Same(control, Control.
FromHandle
(handle));
2013
Assert.Null(Control.
FromHandle
(handle));
2023
Assert.Null(Control.
FromHandle
(handle));
2027
Assert.Null(Control.
FromHandle
(handle));
2044
Assert.Null(Control.
FromHandle
(window.Handle));
2048
Assert.Null(Control.
FromHandle
(window.Handle));
2054
Assert.Null(Control.
FromHandle
(IntPtr.Zero));
2055
Assert.Null(Control.
FromHandle
(1));