title: I can not find the error in the code.a picture Box does not update
body: <p>I'm creating a software in which <code>pictureBox2</code> updates with the color of the pixel clicked on <code>pictureBox1</code>.</p>
  
  <p>Already tried to use <code>refresh()</code>, but <code>pictureBox2</code> does not change.</p>
  
  <pre class="lang-cs prettyprint-override"><code>private void PictureBox1_MouseUp(object sender, MouseEventArgs e)
  {
      Bitmap b = new Bitmap(pictureBox1.Image);
      color = b.GetPixel(e.X, e.Y); // Color
  
      solidColor = new Bitmap(pictureBox2.Width, pictureBox2.Height, PixelFormat.Format24bppRgb); //Image
      using (Graphics grp = Graphics.FromImage(solidColor))
      {
          SolidBrush co = new SolidBrush(color);
          grp.FillRectangle( co, 0, 0, pictureBox2.Width, pictureBox2.Height);
      }
  
      pictureBox2.Image = solidColor;
  }
  </code></pre>