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)
5214
Control? control =
FromHandle
(hwnd);
5457
Control? ctl =
FromHandle
(hWndChild);
9332
&& (
FromHandle
(parentHandle) is null || _parent is null)
9400
if (
FromHandle
(hWnd) is not { } control)
10947
Control? previousControl =
FromHandle
(hWnd);
10986
ReflectParent =
FromHandle
(parentHandle);
11231
Control? control =
FromHandle
(m.LParamInternal);
11797
if (!handle.IsNull &&
FromHandle
(handle) is { } control)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (2)
3848
Control? focusedControl =
FromHandle
(PInvoke.GetFocus());
3855
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)
4007
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);
98
control = Control.
FromHandle
(_activeHwnd.Handle);
141
ActiveHwndInternal = new(Control.
FromHandle
(hwndActive), hwndActive);
197
Control? control = Control.
FromHandle
(ActiveHwnd.Handle);
267
if (Control.
FromHandle
(m.HWnd) is ToolStrip toolStrip && !toolStrip.IsDropDown)
414
ActiveHwndInternal = new(Control.
FromHandle
(hwndActive), hwndActive);
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (1)
1156
containerControl =
FromHandle
(PInvoke.GetParent(this)) as ContainerControl;
System\Windows\Forms\Form.cs (2)
287
public static Form? ActiveForm =>
FromHandle
(PInvokeCore.GetForegroundWindow()) as Form;
316
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);
1973
return _owners.TryGetValue(hwnd, out Control? control) ? control : Control.
FromHandle
(hwnd);
2340
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));