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