title: Override paint method doesn't work correctly
body: <p>I am trying to draw a rectangle on <strong>PictureBox</strong> without using <strong>Paint</strong> event of picturebox,So i override the <strong>Onpaint</strong> method :</p>
  
  <pre><code>   public Form1()
          {
              InitializeComponent();
          }
  
          private void Form1_Load(object sender, EventArgs e)
          {
              pictureBox1.Invalidate();
          }
          protected override void OnPaint(PaintEventArgs e)
          {
              base.OnPaint(e);
              Graphics dc = pictureBox1.CreateGraphics();
              Pen bPen=new Pen(Color.Blue,3);
              dc.DrawRectangle(bPen,0,0,50,50);
          }
      }
  </code></pre>
  
  <p>But the rectangle doesn't appear in first time ,but when i change the size of form using mouse my rectangle is appeared why ?!!!</p>