Посмотрите - просто чтобы дать вам представление:
public class MyCheckBox : CheckBox
{
public MyCheckBox()
{
// AutoSize is virtual - so you should not call it here, just demo
AutoSize = false;
// You need padding to make the base.OnPaint() method leaving you some space
Padding = new Padding( 2, 2, 0, 0 );
Size = new Size( 17, 16 );
}
protected override void OnPaint( PaintEventArgs pevent )
{
base.OnPaint( pevent );
if( !Focused )
{
return;
}
using( var pen = new Pen( Color.Black ) )
{
pen.DashStyle = DashStyle.Dot;
pevent.Graphics.DrawRectangle( pen, new Rectangle( 0, 0, 16, 15 ) );
}
}
}