The easiest way is to inherit from the control and override the OnPaint
method, then change all instances of ToolStripMenuItem
to MyToolStripMenuItem
.
class MyToolStripMenuItem : ToolStripMenuItem
{
protected override void OnPaint( PaintEventargs pe )
{
base.OnPaint( pe );
pe.ClipRectangle.Inflate( -1, -1 );
pe.Graphics.DrawRectangle( Pens.Black, pe.ClipRectangle );
}
}
A bit more complicated, but better in the long run for maintainability, is implementing a custom ToolStripRenderer which would allow you to change the look of the entire thing, for example making it look like VS2010.
(Image taken from VBForums)