45 references to WorkingArea
System.Windows.Forms (31)
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 (22)
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; 1939if (moveToLocation.Y + tipSize.Height > screen.WorkingArea.Bottom) 1941moveToLocation.Y = screen.WorkingArea.Bottom - tipSize.Height; 2083? Math.Min(currentTooltipSize.Width - 2 * BalloonOffsetX, screen.WorkingArea.Width) 2084: Math.Min(currentTooltipSize.Width, screen.WorkingArea.Width); 2182if (wp->y + wp->cy + currentCursor.Size.Height - currentCursor.HotSpot.Y > screen.WorkingArea.Bottom) 2192if (wp->x + wp->cx > screen.WorkingArea.Right) 2194wp->x = screen.WorkingArea.Right - wp->cx; 2201if (wp->x + wp->cx > screen.WorkingArea.Right) 2203wp->x = screen.WorkingArea.Right - wp->cx; 2207if (wp->y + wp->cy > screen.WorkingArea.Bottom) 2209wp->y = screen.WorkingArea.Bottom - wp->cy; 2235PInvokeCore.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}");