The form's constructor runs before the form has loaded.
When the form loads, the Paint events for the form and its controls fire. Unfortunately, these events erase anything that has been drawn with a Graphics object derived from the CreateGraphics() method and so you don't see it.
Check this link for confirmation:
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.creategraphics(v=vs.110).aspxIncidentally, when you use CreateGraphics, you should always call Dispose() on the Graphics object to get rid of the underlying unmanaged resources. So I'd change your code to this:
private void button1_Click(object sender, EventArgs e)
{
Rectangle r = new Rectangle(2, 2, 20, 10); //left,top,width,heigth
Graphics g = pictureBox1.CreateGraphics();
g.FillRectangle(Brushes.Red, r);
g.Dispose();
}