45 references to WorkingArea
System.Windows.Forms (31)
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 (3)
3672
Rectangle screenRect = desktop.
WorkingArea
;
3857
Rectangle screenRect = desktop.
WorkingArea
;
3913
Rectangle screenRect = desktop.
WorkingArea
;
System\Windows\Forms\Screen.cs (4)
283
public static Rectangle GetWorkingArea(Point pt) => FromPoint(pt).
WorkingArea
;
288
public static Rectangle GetWorkingArea(Rectangle rect) => FromRectangle(rect).
WorkingArea
;
293
public 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)
1327
left = (rect.left < screen.
WorkingArea
.Left) ? screen.
WorkingArea
.Left : rect.left,
1328
top = (rect.top < screen.
WorkingArea
.Top) ? screen.
WorkingArea
.Top : rect.top,
1329
right = (rect.right > screen.
WorkingArea
.Right) ? screen.
WorkingArea
.Right : rect.right,
1330
bottom = (rect.bottom > screen.
WorkingArea
.Bottom) ? screen.
WorkingArea
.Bottom : rect.bottom
1933
if (moveToLocation.X + tipSize.Width > screen.
WorkingArea
.Right)
1935
moveToLocation.X = screen.
WorkingArea
.Right - tipSize.Width;
1939
if (moveToLocation.Y + tipSize.Height > screen.
WorkingArea
.Bottom)
1941
moveToLocation.Y = screen.
WorkingArea
.Bottom - tipSize.Height;
2083
? Math.Min(currentTooltipSize.Width - 2 * BalloonOffsetX, screen.
WorkingArea
.Width)
2084
: Math.Min(currentTooltipSize.Width, screen.
WorkingArea
.Width);
2182
if (wp->y + wp->cy + currentCursor.Size.Height - currentCursor.HotSpot.Y > screen.
WorkingArea
.Bottom)
2192
if (wp->x + wp->cx > screen.
WorkingArea
.Right)
2194
wp->x = screen.
WorkingArea
.Right - wp->cx;
2201
if (wp->x + wp->cx > screen.
WorkingArea
.Right)
2203
wp->x = screen.
WorkingArea
.Right - wp->cx;
2207
if (wp->y + wp->cy > screen.
WorkingArea
.Bottom)
2209
wp->y = screen.
WorkingArea
.Bottom - wp->cy;
2235
PInvokeCore.SendMessage(this, PInvoke.TTM_SETMAXTIPWIDTH, 0, screen.
WorkingArea
.Width);
System.Windows.Forms.Design (3)
System\ComponentModel\Design\DesignerActionPanel.cs (1)
234
Rectangle rectScreen = Screen.FromPoint(rectangleAnchor.Location).
WorkingArea
;
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (2)
347
Rectangle rectScreen = Screen.FromRectangle(ActionPanel.RectangleToScreen(editorBounds)).
WorkingArea
;
371
Rectangle rectScreen = Screen.FromRectangle(ActionPanel.RectangleToScreen(editorBounds)).
WorkingArea
;
System.Windows.Forms.Tests (8)
System\Windows\Forms\ScreenTests.cs (8)
174
Assert.Equal(screen.
WorkingArea
, Screen.GetWorkingArea(control));
182
Assert.Equal(screen.
WorkingArea
, Screen.GetWorkingArea(point));
190
Assert.Equal(screen.
WorkingArea
, Screen.GetWorkingArea(rectangle));
203
Assert.Equal($"Screen[Bounds={screen.Bounds} WorkingArea={screen.
WorkingArea
} Primary=True DeviceName={screen.DeviceName}", screen.ToString());
213
Assert.InRange(screen.
WorkingArea
.Width, 0, screen.Bounds.Width);
214
Assert.InRange(screen.
WorkingArea
.Height, 0, screen.Bounds.Height);
215
Assert.InRange(screen.
WorkingArea
.X, screen.Bounds.X, screen.Bounds.X + screen.Bounds.Width);
216
Assert.InRange(screen.
WorkingArea
.Y, screen.Bounds.Y, screen.Bounds.Y + screen.Bounds.Width);
System.Windows.Forms.UI.IntegrationTests (3)
FormTests.cs (2)
64
var screenWorkingArea = Screen.FromControl(form).
WorkingArea
;
124
var screenWorkingArea = Screen.FromControl(form).
WorkingArea
;
TabControlTests.cs (1)
57
TestOutputHelper.WriteLine($"Primary screen: {Screen.PrimaryScreen?.
WorkingArea
}");