public static void EnsureDisplayAttributes(this WindowSettings settings, Form window) { settings.ValidateArguments(window); Rectangle bounds = new Rectangle(settings.Location.ToPoint(), settings.Dimension.ToSize()); if (settings.IsVisibleOnAllScreens(bounds)) { window.StartPosition = FormStartPosition.Manual; window.DesktopBounds = bounds; } else { window.StartPosition = FormStartPosition.WindowsDefaultLocation; window.Size = bounds.Size; } }