
Public Class Form1
    '添加窗体级变量：
    Private PicNo As Integer '图片编号 
    '编写事件代码： 
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Timer1.Interval = 600
        Timer1.Enabled = True
        ToolStripStatusLabel1.Text = ""
        PicNo = 0
    End Sub
    '计时器控件Tick事件代码：
    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        PicNo = PicNo + 1
        Dim file As String
        file = Application.StartupPath & "\DG0" + PicNo.ToString() + ".bmp"  '图像文件名
        PictureBox1.Image = Image.FromFile(file)
        If PicNo = 5 Then
            PicNo = 0
        End If
    End Sub
    '“加速”按钮事件代码：
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        ToolStripStatusLabel1.Text = "正在加速"
        Button2.Enabled = True
        Timer1.Interval = Timer1.Interval - 150
        If Timer1.Interval <= 160 Then
            ToolStripStatusLabel1.Text = "太快了把我累死了!"
            Button1.Enabled = False
        End If
    End Sub
    '“减速”按钮事件代码：
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        ToolStripStatusLabel1.Text = "正在减速"
        Button1.Enabled = True
        Timer1.Interval = Timer1.Interval + 150
        If Timer1.Interval >= 2000 Then
            ToolStripStatusLabel1.Text = "保持不住姿势啦! "
            Button2.Enabled = False
        End If
    End Sub

End Class
