11 references to FromControl
System.Windows.Forms (5)
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
6427
Rectangle rectScreen = Screen.
FromControl
(this).WorkingArea;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (1)
1420
Rectangle rectScreen = Screen.
FromControl
(EditTextBox).WorkingArea;
System\Windows\Forms\Form.cs (1)
3900
desktop = Screen.
FromControl
(OwnerInternal);
System\Windows\Forms\Screen.cs (2)
293
public static Rectangle GetWorkingArea(Control ctl) =>
FromControl
(ctl).WorkingArea;
308
public static Rectangle GetBounds(Control ctl) =>
FromControl
(ctl).Bounds;
System.Windows.Forms.Tests (4)
System\Windows\Forms\ScreenTests.cs (4)
77
Screen screen = Screen.
FromControl
(control);
85
Assert.Throws<ArgumentNullException>("control", () => Screen.
FromControl
(null));
143
Screen screen = Screen.
FromControl
(control);
173
Screen screen = Screen.
FromControl
(control);
System.Windows.Forms.UI.IntegrationTests (2)
FormTests.cs (2)
64
var screenWorkingArea = Screen.
FromControl
(form).WorkingArea;
124
var screenWorkingArea = Screen.
FromControl
(form).WorkingArea;