private void Form1_Paint(object sender, PaintEventArgs e)
{
Pen p = new Pen(Brushes.Black, 1);
e.Graphics.DrawRectangle(p, 3, 3, 89, 30);
}
Why does this code produce a 90px width / 31px height box? i.e one pixel bigger than requested. BTW: FillRectangle works fine.
I imagine that it is because the command defines the inside size of the rectangle and draws the border around that.