line

 1 using System;
 2 using System.Collections.Generic;
 3 using System.ComponentModel;
 4 using System.Data;
 5 using System.Drawing;
 6 using System.Text;
 7 using System.Windows.Forms;
 8 
 9 namespace RealICQ.Service.Managers
10 {
11     public partial class Line : Control
12     {
13         public Line()
14         {
15             InitializeComponent();
16 
17             base.Height = 2;
18         }
19 
20         public new int Height
21         {
22             get { return base.Height; }
23         }
24         
25 
26         protected override void OnPaint(PaintEventArgs pe)
27         {
28             base.OnPaint(pe);
29             pe.Graphics.DrawLine(SystemPens.ControlDark, 0, 0, this.Width, 0);
30             pe.Graphics.DrawLine(SystemPens.ControlLightLight, 1, 1, this.Width, 1);
31         }
32     }
33 }
原文地址:https://www.cnblogs.com/topcoder/p/2916395.html