title: RichTextBox not showing the text
body: <p>I am trying to create a Bitmap from a RichTextBox and set it as the background image for a panel, but unfortunately the text is not shown.</p>
  
  <pre><code>Bitmap l_bitmap = new Bitmap(m_control.Width, m_control.Height);
  m_control.DrawToBitmap(l_bitmap, new Rectangle(0, 0, l_bitmap.Width, l_bitmap.Height));
  m_panel.BackgroundImage = l_bitmap;
  m_panel.Refresh();
  </code></pre>
  
  <p>m_control is my RichTextBox. When I debug, I can see that the control contains the text I wrote, but the bitmap just shows an empty RichTextBox.</p>
  
  <p>I use the same code for other types of controls (Button, CheckBox, TextBox...). The text is shown with no problems. </p>