I have a ToolStripButton inside a ToolStrip that I want to draw a border around. This is the code I am using:
private void tsbtnSearch_Paint(object sender, PaintEventArgs e)
{
ToolStripButton btn = (ToolStripButton)sender;
ControlPaint.DrawBorder(e.Graphics, btn.Bounds,
Color.Red, 3, ButtonBorderStyle.Outset,
Color.Red, 3, ButtonBorderStyle.Outset,
Color.Red, 3, ButtonBorderStyle.Outset,
Color.Red, 3, ButtonBorderStyle.Outset);
}
The border is being drawn as shown in the image below:
What do I need to do to get the coordinates correct?