title: Display picture box faster
body: <p>I am trying to load images quickly into a picturebox and draw on them. I have a .13 second delay between the time I assign a bitmap to the picture box and when it shows up. And whenever I do a <code>picturebox.refresh()</code>, it is the same delay of .13 - .15 seconds before the paint method is called. Is there any way to get rid of this delay?</p>
  
  <p>I am using C# in Visual Studio 2010. I load the images using FreeImage library. </p>
  
  <p>Here is the code in my pictureBox_MouseMove event:  </p>
  
  <pre><code>if (IsMouseDown || DrawLine.Checked || IsMovingBox)  
  {  
    Tracing.Trace("Update Picture Box");  
    pictureBox.Refresh();  
  } 
  </code></pre>
  
  <p>Then I trace out a line when my paint event is called. The delay is between the two trace lines.</p>
  
  <p>If I use a bitonal tiff image at 117kb the delay is .13 seconds. To load this image into memory takes .04 seconds. To replace my picturebox bitmap with this bitmap takes .01 seconds.</p>
  
  <p>If I use a gray scale jpg image at 1125kb the delay is .14 seconds. To load this image into memory takes .26 seconds. To replace my picturebox bitmap with this bitmap takes .03 seconds.</p>