Imports System.Drawing.Image
Public Class Form1
Inherits System.Windows.Forms.Form
Private imgAnim As Image
Private gr As Graphics
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer1.Enabled = True
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
imgAnim = Image.FromFile(Application.StartupPath & "\explosion.bmp")
gr = Me.CreateGraphics
End Sub
Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Static iFrame As Byte = 0
Dim rect As New Rectangle(iFrame * 65, 0, 65, 65)
gr.DrawImage(imgAnim, 50, 50, rect, GraphicsUnit.Pixel)
iFrame += 1
If iFrame = 6 Then iFrame = 0
End Sub
End Class