47 references to WorkingArea
System.Windows.Forms (33)
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 (3)
3672Rectangle screenRect = desktop.WorkingArea; 3857Rectangle screenRect = desktop.WorkingArea; 3913Rectangle screenRect = desktop.WorkingArea;
System\Windows\Forms\Screen.cs (4)
283public static Rectangle GetWorkingArea(Point pt) => FromPoint(pt).WorkingArea; 288public static Rectangle GetWorkingArea(Rectangle rect) => FromRectangle(rect).WorkingArea; 293public static Rectangle GetWorkingArea(Control ctl) => FromControl(ctl).WorkingArea; 345=> $"{GetType().Name}[Bounds={_bounds} WorkingArea={WorkingArea} Primary={_primary} DeviceName={_deviceName}";
System\Windows\Forms\ToolTip\ToolTip.cs (24)
1327left = (rect.left < screen.WorkingArea.Left) ? screen.WorkingArea.Left : rect.left, 1328top = (rect.top < screen.WorkingArea.Top) ? screen.WorkingArea.Top : rect.top, 1329right = (rect.right > screen.WorkingArea.Right) ? screen.WorkingArea.Right : rect.right, 1330bottom = (rect.bottom > screen.WorkingArea.Bottom) ? screen.WorkingArea.Bottom : rect.bottom 1933if (moveToLocation.X + tipSize.Width > screen.WorkingArea.Right) 1935moveToLocation.X = screen.WorkingArea.Right - tipSize.Width; 1938if (moveToLocation.X < screen.WorkingArea.Left) 1940moveToLocation.X = screen.WorkingArea.Left; 1944if (moveToLocation.Y + tipSize.Height > screen.WorkingArea.Bottom) 1946moveToLocation.Y = screen.WorkingArea.Bottom - tipSize.Height; 2088? Math.Min(currentTooltipSize.Width - 2 * BalloonOffsetX, screen.WorkingArea.Width) 2089: Math.Min(currentTooltipSize.Width, screen.WorkingArea.Width); 2187if (wp->y + wp->cy + currentCursor.Size.Height - currentCursor.HotSpot.Y > screen.WorkingArea.Bottom) 2197if (wp->x + wp->cx > screen.WorkingArea.Right) 2199wp->x = screen.WorkingArea.Right - wp->cx; 2206if (wp->x + wp->cx > screen.WorkingArea.Right) 2208wp->x = screen.WorkingArea.Right - wp->cx; 2212if (wp->y + wp->cy > screen.WorkingArea.Bottom) 2214wp->y = screen.WorkingArea.Bottom - wp->cy; 2240PInvokeCore.SendMessage(this, PInvoke.TTM_SETMAXTIPWIDTH, 0, screen.WorkingArea.Width);
System.Windows.Forms.Design (3)
System\ComponentModel\Design\DesignerActionPanel.cs (1)
234Rectangle rectScreen = Screen.FromPoint(rectangleAnchor.Location).WorkingArea;
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (2)
347Rectangle rectScreen = Screen.FromRectangle(ActionPanel.RectangleToScreen(editorBounds)).WorkingArea; 371Rectangle rectScreen = Screen.FromRectangle(ActionPanel.RectangleToScreen(editorBounds)).WorkingArea;
System.Windows.Forms.Tests (8)
System\Windows\Forms\ScreenTests.cs (8)
174Assert.Equal(screen.WorkingArea, Screen.GetWorkingArea(control)); 182Assert.Equal(screen.WorkingArea, Screen.GetWorkingArea(point)); 190Assert.Equal(screen.WorkingArea, Screen.GetWorkingArea(rectangle)); 203Assert.Equal($"Screen[Bounds={screen.Bounds} WorkingArea={screen.WorkingArea} Primary=True DeviceName={screen.DeviceName}", screen.ToString()); 213Assert.InRange(screen.WorkingArea.Width, 0, screen.Bounds.Width); 214Assert.InRange(screen.WorkingArea.Height, 0, screen.Bounds.Height); 215Assert.InRange(screen.WorkingArea.X, screen.Bounds.X, screen.Bounds.X + screen.Bounds.Width); 216Assert.InRange(screen.WorkingArea.Y, screen.Bounds.Y, screen.Bounds.Y + screen.Bounds.Width);
System.Windows.Forms.UI.IntegrationTests (3)
FormTests.cs (2)
64var screenWorkingArea = Screen.FromControl(form).WorkingArea; 124var screenWorkingArea = Screen.FromControl(form).WorkingArea;
TabControlTests.cs (1)
57TestOutputHelper.WriteLine($"Primary screen: {Screen.PrimaryScreen?.WorkingArea}");