9 instantiations of Screen
System.Windows.Forms (9)
System\Windows\Forms\Screen.cs (9)
111
screens.Add(
new
(hmonitor, hdc));
115
s_screens = screens.Count > 0 ? [.. screens] : [
new
(s_primaryMonitor)];
173
return new
Screen
(s_primaryMonitor, default);
251
? new
Screen
(PInvokeCore.MonitorFromPoint(point, MONITOR_FROM_FLAGS.MONITOR_DEFAULTTONEAREST))
252
: new
Screen
(s_primaryMonitor);
259
? new
Screen
(PInvokeCore.MonitorFromRect(rect, MONITOR_FROM_FLAGS.MONITOR_DEFAULTTONEAREST))
260
: new
Screen
(s_primaryMonitor, default);
277
? new
Screen
(PInvokeCore.MonitorFromWindow((HWND)hwnd, MONITOR_FROM_FLAGS.MONITOR_DEFAULTTONEAREST))
278
: new
Screen
(s_primaryMonitor, default);
52 references to Screen
System.Windows.Forms (45)
System\Windows\Forms\ContextMenuStrip.cs (1)
98
Rectangle screenBounds =
Screen
.FromRectangle(bounds).Bounds;
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (2)
6421
Rectangle rectScreen =
Screen
.FromControl(this).WorkingArea;
18817
Rectangle rect =
Screen
.GetBounds(pt);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (1)
1443
Rectangle rectScreen =
Screen
.FromControl(EditTextBox).WorkingArea;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (1)
552
return
Screen
.GetWorkingArea(Bounds).Size - Padding.Size;
System\Windows\Forms\Dialogs\CommonDialogs\CommonDialog.cs (1)
98
Rectangle screen =
Screen
.GetWorkingArea(Control.MousePosition);
System\Windows\Forms\Form.cs (9)
3708
Screen
desktop;
3715
desktop =
Screen
.FromHandle(ownerHandle.Handle);
3720
desktop =
Screen
.FromPoint(MousePosition);
3907
Screen
desktop =
Screen
.FromHandle(ownerHandle);
3948
Screen
desktop;
3951
desktop =
Screen
.FromControl(OwnerInternal);
3961
desktop = !hWndOwner.IsNull ?
Screen
.FromHandle(hWndOwner) :
Screen
.FromPoint(MousePosition);
System\Windows\Forms\Internal\WinFormsUtils.cs (2)
65
return ConstrainToBounds(
Screen
.GetWorkingArea(bounds), bounds);
73
return ConstrainToBounds(
Screen
.FromRectangle(bounds).Bounds, bounds);
System\Windows\Forms\Rendering\DisplayInformation.cs (2)
30
if (s_bitsPerPixel == 0 &&
Screen
.PrimaryScreen is not null)
37
s_bitsPerPixel = (short)
Screen
.PrimaryScreen.BitsPerPixel;
System\Windows\Forms\Screen.cs (14)
48
private static
Screen
[]? s_screens;
100
public static unsafe
Screen
[] AllScreens
108
List<
Screen
> screens = [];
154
public static
Screen
? PrimaryScreen
160
Screen
[] screens = AllScreens;
244
public override bool Equals(object? obj) => obj is
Screen
comp && _hmonitor == comp._hmonitor;
247
/// Retrieves a <see cref="
Screen
"/> for the monitor that contains the specified point.
249
public static
Screen
FromPoint(Point point)
255
/// Retrieves a <see cref="
Screen
"/> for the monitor that contains the largest region of the rectangle.
257
public static
Screen
FromRectangle(Rectangle rect)
263
/// Retrieves a <see cref="
Screen
"/> for the monitor that contains the largest region of the window of the control.
265
public static
Screen
FromControl(Control control)
273
/// Retrieves a <see cref="
Screen
"/> for the monitor that contains the largest region of the window.
275
public static
Screen
FromHandle(IntPtr hwnd)
System\Windows\Forms\ToolTip\ToolTip.cs (12)
1317
Screen
screen =
Screen
.FromPoint(cursorLocation);
1924
Screen
screen =
Screen
.FromPoint(moveToLocation);
2080
Screen
screen =
Screen
.FromPoint(Cursor.Position);
2176
Screen
screen =
Screen
.FromPoint(cursorPos);
2198
Screen
screen =
Screen
.FromPoint(tipInfo.Position);
2233
Screen
screen =
Screen
.FromPoint(Cursor.Position);
System.Windows.Forms.Design (7)
System\ComponentModel\Design\DesignerActionPanel.cs (1)
234
Rectangle rectScreen =
Screen
.FromPoint(rectangleAnchor.Location).WorkingArea;
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (2)
344
Rectangle rectScreen =
Screen
.FromRectangle(ActionPanel.RectangleToScreen(editorBounds)).WorkingArea;
368
Rectangle rectScreen =
Screen
.FromRectangle(ActionPanel.RectangleToScreen(editorBounds)).WorkingArea;
System\ComponentModel\Design\MultilineStringEditor.MultilineStringEditorUI.cs (2)
163
Rectangle workingArea =
Screen
.GetWorkingArea(this);
239
Rectangle workingArea =
Screen
.GetWorkingArea(this);
System\Windows\Forms\Design\ToolStripDesignerUtils.cs (2)
539
foreach (
Screen
s in
Screen
.AllScreens)