<u>private v</u><u>oid</u> Form1_Paint(<u>object</u> sender, <u>PaintEventArgs</u> e)
{
using (<u>Graphics</u> g = e.Graphics)
{
<u>const byte</u> width = 30;
g.Clear(Color.White);
<u>Random</u> r = new Random();
for (<u>int</u> i = 0; i <= this.Width / width; i++)
for (<u>int</u> j = 0; j <= this.Width / width; j++)
{
g.DrawRectangle(
new Pen(Color.FromArgb(r.Next(0, 255), r.Next(0, 255), r.Next(0, 255)), 3),
width * i,
width * j,
width * (i + 1),
width * (j + 1)
);
}
}
}