23 references to Bounds
System.Windows.Forms (5)
System\Windows\Forms\ContextMenuStrip.cs (1)
98Rectangle screenBounds = Screen.FromRectangle(bounds).Bounds;
System\Windows\Forms\Internal\WinFormsUtils.cs (1)
73return ConstrainToBounds(Screen.FromRectangle(bounds).Bounds, bounds);
System\Windows\Forms\Screen.cs (3)
298public static Rectangle GetBounds(Point pt) => FromPoint(pt).Bounds; 303public static Rectangle GetBounds(Rectangle rect) => FromRectangle(rect).Bounds; 308public static Rectangle GetBounds(Control ctl) => FromControl(ctl).Bounds;
System.Windows.Forms.Tests (14)
System\Windows\Forms\ScreenTests.cs (14)
144Assert.Equal(screen.Bounds, Screen.GetBounds(control)); 152Assert.Equal(screen.Bounds, Screen.GetBounds(point)); 160Assert.Equal(screen.Bounds, Screen.GetBounds(rectangle)); 203Assert.Equal($"Screen[Bounds={screen.Bounds} WorkingArea={screen.WorkingArea} Primary=True DeviceName={screen.DeviceName}", screen.ToString()); 209Assert.NotEqual(0, screen.Bounds.Width); 210Assert.NotEqual(0, screen.Bounds.Height); 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 (4)
Infra\ScreenshotService.cs (4)
52int width = primaryScreen.Bounds.Width; 53int height = primaryScreen.Bounds.Height; 66sourceX: primaryScreen.Bounds.X, 67sourceY: primaryScreen.Bounds.Y,