title: How can I save a Panel in my form as a picture?
body: <p>I have a form that has 2 panels. I'm trying to save the contents of Panel2 as an image. I saw a thread that talked about using the screen capture to do this, but I can't find the thread anymore. Also read about using the DrawToBitMap method, but it's from visual studio 2005 info, not sure if it's the most current or suitable solution for this. So what do you recommend for saving my Panel2 as a picture, preferably a jpg?</p>
  
  <p>UPDATE:
  I implemented the code recommended below for the DrawToBitMap, but it saves half of my panel2 (the left half if that makes a difference). 
  Because it saved half my panel2, I multiplied the width call by '2' to make it save the full form. Kind of a weird thing and doesn't make sense to me since the width of panel 2 should be the full panel and not half of it?</p>
  
  <pre><code>//multiplies the width of panel2 call by 2 to make it save the full panel
  Bitmap bmp = new Bitmap(splitContainer1.Panel2.Width * 2, splitContainer1.Panel2.Height);
  splitContainer1.Panel2.DrawToBitmap(bmp, splitContainer1.Panel2.Bounds);
  bmp.Save(@"C:\Test.bmp");
  </code></pre>