VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form Form1 
   Caption         =   "Animation应用示例"
   ClientHeight    =   2370
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4635
   LinkTopic       =   "Form1"
   ScaleHeight     =   2370
   ScaleWidth      =   4635
   StartUpPosition =   3  '窗口缺省
   Begin VB.Timer Timer1 
      Interval        =   1000
      Left            =   3960
      Top             =   720
   End
   Begin MSComCtl2.Animation Animation1 
      Height          =   615
      Left            =   600
      TabIndex        =   2
      Top             =   0
      Width           =   1095
      _ExtentX        =   1931
      _ExtentY        =   1085
      _Version        =   393216
      FullWidth       =   73
      FullHeight      =   41
   End
   Begin MSComctlLib.ProgressBar ProgressBar1 
      Height          =   375
      Left            =   120
      TabIndex        =   1
      Top             =   1800
      Width           =   4455
      _ExtentX        =   7858
      _ExtentY        =   661
      _Version        =   393216
      Appearance      =   1
      Max             =   30
   End
   Begin VB.CommandButton Command1 
      Caption         =   "开始计算"
      Height          =   375
      Left            =   3000
      TabIndex        =   0
      Top             =   120
      Width           =   1575
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim x As Integer
Private Sub Command1_Click()
    Animation1.Play
    Timer1.Enabled = True
End Sub
Private Sub Form_Load()
    ProgressBar1.Align = vbAlignBottom
    Timer1.Enabled = False
    Animation1.Open ("c:\program files\microsoft visual studio\common\graphics\videos\blur16.avi")
End Sub

Private Sub Timer1_Timer()
    x = x + 1
    If x > 30 Then
        Animation1.Stop
        Timer1.Enabled = False
    Else
        ProgressBar1.Value = ProgressBar1.Value + 1
    End If
End Sub
