‘Subclass Button’ and adding a custom ‘Paint’ event handler lets you do this.
[C#]
public class CustomButton : Button
{
public CustomButton()
{
Paint += new PaintEventHandler( ButtonPaint );
}
private void ButtonPaint( object sender, PaintEventArgs e )
{
Pen pen = new Pen( Color.Red );
pen.Width = 8;
e.Graphics.DrawLine( pen, 7, 4, 7, Height - 4 );
pen.Width = 1;
e.Graphics.DrawEllipse( pen, Width - 16 , 6, 8, 8 );
}
}
Permalink