Public Class Form2
    '添加窗体级变量：
    Private PicNo As Integer '图片编号 
    Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
        Me.Text = "正常速度"
        Timer1.Interval = 500
    End Sub
    Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged
        Me.Text = "正在加速"
        Timer1.Interval = 200
    End Sub
    Private Sub RadioButton3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton3.CheckedChanged
        Me.Text = "正在减速"
        Timer1.Interval = 850
    End Sub

    '计时器控件Tick事件代码：
    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Dim file As String              '图像文件名
        file = Application.StartupPath & "\DG0" & PicNo & ".bmp"
        PictureBox1.Image = Image.FromFile(file)
        PicNo = PicNo + 1
        If PicNo = 6 Then
            PicNo = 1
        End If

    End Sub

    Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Timer1.Interval = 500
        Timer1.Enabled = True
        Me.Text = "正常速度"
        PicNo = 1
    End Sub

    Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
        If CheckBox1.Checked Then
            My.Computer.Audio.Play("c:\Notify.wav", AudioPlayMode.BackgroundLoop)
        End If
    End Sub
End Class