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