title: Save Draw String or e.graphic as image
body: <p>NEED HELP PLEASE ! Saving Picture with ""Drawstring, e.graphic""</p>
  
  <pre><code>Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs)
  
      Dim Bmp As New Bitmap(Width, Height)
      Dim objBitmap As New Bitmap(Width, Height)
  
      objBitmap.Save("c:\Prompter\checking2.TIFF")
  
      Dim g As Graphics = Graphics.FromImage(Bmp)
      Dim cx As Integer = Width
      Dim cy As Integer = Height
      Dim pen As New Pen(Color.Black)
      Dim rect As New Rectangle(0, 0, Width, Height)
  
      Dim drawFormat As New StringFormat()
      drawFormat.Alignment = StringAlignment.Center
      drawFormat.LineAlignment = StringAlignment.Center
  
      Dim stringFont As New Font("Arial", 50)
      g.DrawString(RichTextBox1.Text, stringFont, New SolidBrush(Color.White), rect, drawFormat)
  
      Bmp.Save("c:\Prompter\checking2.TIFF", Imaging.ImageFormat.Tiff)
  
      Using bmp2 As New Drawing.Bitmap(Width, Height)
          DrawToBitmap(Bmp, New Rectangle(0, 0, Bmp.Width, Bmp.Height))
          Bmp.Save("c:\Prompter\screenshoot.bmp")
      End Using 
  End Sub
  </code></pre>
  
  <p>Not saving Picture just BLANK Image is showing !</p>