If anyone can help me out here, i would really appreciate it. I am trying to do a relatively simple task -> Rotate a Picture. Which works fine. But the problem is, my code uses the upper left corner to rotate the image. Is it possible to change that to the middle, or the origin, so that i can rotate the picture from the center. If so, how is this done? Here is the sample code, basically it is a panel on a form, and this is it's paint event. It loads a picture from the programs bin folder. Thanks alot...

Jeff

VB Code:
  1. Private Sub TextArea_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles TextArea.Paint
  2.  
  3.         Dim sa As System.Drawing.Size
  4.         sa = TextArea.Size
  5.  
  6.         Dim middle As New Point(sa.Width / 4, sa.Height / 3)
  7.         e.Graphics.TranslateTransform(middle.X, middle.Y)
  8.  
  9.         'Apply all transforms....
  10.         e.Graphics.RotateTransform(45) 'angle to rotate
  11.  
  12.         Dim bmp As New Bitmap("sample.jpg")
  13.         e.Graphics.DrawImage(bmp, 0, 0)
  14.  
  15.     End Sub