VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4800
   LinkTopic       =   "Form1"
   ScaleHeight     =   3195
   ScaleWidth      =   4800
   StartUpPosition =   3  '窗口缺省
   Begin MSComDlg.CommonDialog CommonDialog1 
      Left            =   1005
      Top             =   1995
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
   Begin VB.CommandButton cmdExit 
      Caption         =   "退  出"
      Height          =   315
      Left            =   3765
      TabIndex        =   4
      Top             =   2760
      Width           =   870
   End
   Begin VB.CommandButton cmdStop 
      Caption         =   "停  止"
      Height          =   315
      Left            =   2700
      TabIndex        =   3
      Top             =   2745
      Width           =   870
   End
   Begin VB.CommandButton cmdPlay 
      Caption         =   "播  放"
      Height          =   300
      Left            =   1485
      TabIndex        =   2
      Top             =   2745
      Width           =   990
   End
   Begin VB.CommandButton cmdOpen 
      Caption         =   "打开文件"
      Height          =   300
      Left            =   240
      TabIndex        =   1
      Top             =   2760
      Width           =   1050
   End
   Begin MSComCtl2.Animation Animation1 
      Height          =   2385
      Left            =   255
      TabIndex        =   0
      Top             =   180
      Width           =   4290
      _ExtentX        =   7567
      _ExtentY        =   4207
      _Version        =   393216
      Center          =   -1  'True
      FullWidth       =   286
      FullHeight      =   159
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub cmdExit_Click()
    Animation1.Close    '关闭动画
    End
End Sub

Private Sub cmdOpen_Click()
On Error Resume Next    '启动错误陷阱，如果发生错误则跳过该行，执行下一行语句
    CommonDialog1.ShowOpen
    Animation1.Open CommonDialog1.FileName  '打开动画文件
On Error GoTo 0     '关闭错误陷阱
End Sub

Private Sub cmdPlay_Click()
    Animation1.Play     '播放动画
End Sub

Private Sub cmdStop_Click()
On Error Resume Next  '启动错误陷阱，如果发生错误则跳过该行，执行下一行语句
    Animation1.Stop   '停止播放
On Error GoTo 0       '关闭错误陷阱
End Sub
