There is no built-in control for WinForms. You can use the GroupBox control, but set the Text property to an empty string and set the height to 2 . This will simulate an embossed line. Otherwise, you need to create your own control and draw a line yourself.
For a user control, an example is given here.
using System.ComponentModel; using System.Drawing; using System.Windows.Forms; namespace WindowsFormsApplication12 { public partial class Line : Control { public Line() { InitializeComponent(); } private Color m_LineColor = Color.Black;
It simply fills the ClientRectangle specified LineColor , so the height and width of the line is the control itself. Set accordingly.
source share