using System.Drawing; using System.Windows.Forms; namespace RyzStudio.Windows.Forms { public partial class HorizontalSeparator : UserControl { public HorizontalSeparator() : base() { //InitializeComponent(); this.MaximumSize = new Size(SystemInformation.VirtualScreen.Width, 2); } protected override void OnPaintBackground(PaintEventArgs e) { base.OnPaintBackground(e); Graphics g = e.Graphics; g.FillRectangle(new SolidBrush(Color.FromArgb(213, 223, 229)), new Rectangle(this.DisplayRectangle.Left, 0, this.DisplayRectangle.Width, 1)); g.FillRectangle(new SolidBrush(Color.FromArgb(249, 251, 253)), new Rectangle(this.DisplayRectangle.Left, 1, this.DisplayRectangle.Width, 1)); } } }