// ControlPaintTest.cs using System; using System.Drawing; using System.Windows.Forms; class ControlPaintTest : Form { static void Main() { Application.Run(new ControlPaintTest()); } public ControlPaintTest() { bm = new Bitmap(12, 12); Graphics gx = Graphics.FromImage(bm); ControlPaint.DrawCheckBox(gx, 0, 0, 14, 14, ButtonState.Checked); gx.Dispose(); } protected override void OnPaint(PaintEventArgs args) { Graphics gx = args.Graphics; gx.DrawImage(bm, 10, 10); } Bitmap bm; }