'The angle of rotation.
Private angle As Integer = 0
'The image to display.
Private image As Image = image.FromFile("put image file path here")
'Half the image's width.
Private halfImageWidth As Integer = image.Width \ 2
'Half the image's height.
Private halfImageHeight As Integer = image.Height \ 2
Private Sub Form1_Load(ByVal sender As Object, _
ByVal e As EventArgs) Handles MyBase.Load
'Start the timer ticking 20 times per second.
Me.Timer1.Interval = 50
Me.Timer1.Start()
End Sub
Private Sub Timer1_Tick(ByVal sender As Object, _
ByVal e As EventArgs) Handles Timer1.Tick
'Rotate one more degree clockwise and redraw the image.
Me.angle = (Me.angle + 1) Mod 360
Me.Refresh()
End Sub
Private Sub Form1_Paint(ByVal sender As Object, _
ByVal e As PaintEventArgs) Handles Me.Paint
Dim clientSize As Size = Me.ClientSize
With e.Graphics
'Shift the Graphics object's origin to the centre of the form.
.TranslateTransform(clientSize.Width \ 2, clientSize.Height \ 2)
'Rotate the Graphics object's world around its origin.
.RotateTransform(Me.angle)
'Draw the image with its centre at the Graphics object's origin.
.DrawImage(Me.image, -Me.halfImageWidth, -Me.halfImageHeight)
End With
End Sub