47 references to WorkingArea
System.Windows.Forms (33)
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 (24)
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;
1938
if (moveToLocation.X < screen.
WorkingArea
.Left)
1940
moveToLocation.X = screen.
WorkingArea
.Left;
1944
if (moveToLocation.Y + tipSize.Height > screen.
WorkingArea
.Bottom)
1946
moveToLocation.Y = screen.
WorkingArea
.Bottom - tipSize.Height;
2088
? Math.Min(currentTooltipSize.Width - 2 * BalloonOffsetX, screen.
WorkingArea
.Width)
2089
: Math.Min(currentTooltipSize.Width, screen.
WorkingArea
.Width);
2187
if (wp->y + wp->cy + currentCursor.Size.Height - currentCursor.HotSpot.Y > screen.
WorkingArea
.Bottom)
2197
if (wp->x + wp->cx > screen.
WorkingArea
.Right)
2199
wp->x = screen.
WorkingArea
.Right - wp->cx;
2206
if (wp->x + wp->cx > screen.
WorkingArea
.Right)
2208
wp->x = screen.
WorkingArea
.Right - wp->cx;
2212
if (wp->y + wp->cy > screen.
WorkingArea
.Bottom)
2214
wp->y = screen.
WorkingArea
.Bottom - wp->cy;
2240
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
}");