title: PictureBox PaintEvent with other method
body: <p>There is only one picturebox in my form and I want to drawcircle with a method on this picturebox but I cant do that and not working.The method is:</p>
  
  <pre><code>private Bitmap Circle()
      {
          Bitmap bmp;
          Graphics gfx;
          SolidBrush firca_dis=new SolidBrush(Color.FromArgb(192,0,192));
  
              bmp = new Bitmap(40, 40);
              gfx = Graphics.FromImage(bmp);
              gfx.FillRectangle(firca_dis, 0, 0, 40, 40);
  
          return bmp;
      }
  </code></pre>
  
  <p>Picturebox</p>
  
  <pre><code> private void pictureBox2_Paint(object sender, PaintEventArgs e)
      {
          Graphics gfx= Graphics.FromImage(Circle());
          gfx=e.Graphics;
      }
  </code></pre>