VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Object = "{05589FA0-C356-11CE-BF01-00AA0055595A}#2.0#0"; "AMOVIE.OCX"
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   6015
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   8010
   DrawMode        =   1  'Blackness
   LinkTopic       =   "Form1"
   ScaleHeight     =   6015
   ScaleWidth      =   8010
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Command1 
      Caption         =   "退 出"
      Height          =   375
      Index           =   7
      Left            =   120
      TabIndex        =   8
      Top             =   4440
      Width           =   975
   End
   Begin VB.CommandButton Command1 
      Caption         =   "调 速"
      Height          =   375
      Index           =   6
      Left            =   120
      TabIndex        =   7
      Top             =   3840
      Width           =   975
   End
   Begin VB.CommandButton Command1 
      Caption         =   "信 息"
      Height          =   375
      Index           =   5
      Left            =   120
      TabIndex        =   5
      Top             =   3240
      Width           =   975
   End
   Begin MSComDlg.CommonDialog CommonDialog1 
      Left            =   240
      Top             =   4800
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
   Begin VB.CommandButton Command1 
      Caption         =   "帧/时间"
      Height          =   375
      Index           =   4
      Left            =   120
      TabIndex        =   4
      Top             =   2640
      Width           =   975
   End
   Begin VB.CommandButton Command1 
      Caption         =   "全 屏"
      Height          =   375
      Index           =   3
      Left            =   120
      TabIndex        =   3
      Top             =   2040
      Width           =   975
   End
   Begin VB.CommandButton Command1 
      Caption         =   "放 大"
      Height          =   375
      Index           =   2
      Left            =   120
      TabIndex        =   2
      Top             =   1440
      Width           =   975
   End
   Begin VB.CommandButton Command1 
      Caption         =   "原 大"
      Height          =   375
      Index           =   1
      Left            =   120
      TabIndex        =   1
      Top             =   840
      Width           =   975
   End
   Begin VB.CommandButton Command1 
      Caption         =   "打开"
      Height          =   375
      Index           =   0
      Left            =   120
      TabIndex        =   0
      Top             =   240
      Width           =   975
   End
   Begin AMovieCtl.ActiveMovie ActiveMovie1 
      Height          =   1200
      Left            =   1440
      TabIndex        =   6
      Top             =   120
      Width           =   3990
      _ExtentX        =   7038
      _ExtentY        =   2117
      ShowPositionControls=   -1  'True
      ShowSelectionControls=   -1  'True
      Appearance      =   0
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim k, S, HA As Integer
Private Sub Form_Load()
    S = 1: k = 0:
    ActiveMovie1.MovieWindowSize = amvOriginalSize   '设置电影播放窗口为原窗口大小
End Sub
Rem 单击窗体后，取消全屏显示，回到原显示状态
Private Sub Form_Click()
    ActiveMovie1.Pause                                     '暂停播放
    ActiveMovie1.FullScreenMode = False                    '设置非全屏显示
    ActiveMovie1.Run                                       '继续播放
End Sub
Private Sub Command1_Click(Index As Integer)
    If Index = O Then
       PATHFILE = "全部（*.*）|*.*|动画（*.AVI）|*.avi|MP3（*.MP3）|*.MP3|声音(*.WAV)|*.WAV|"
       PATHFILE = PATHFILE + "视频（*.MPG）|*.MPG|VCD(*.DAT)|*.DAT|MIDI(*.MDI)|*.MDI|动画(*.MOV)|*.MOV"
       CommonDialog1.Filter = PATHFILE
       CommonDialog1.FileName = "AVSEQ02.DAT"
       CommonDialog1.InitDir = "J:\MPEGAV"
       CommonDialog1.Action = 1                           '设置通用对话框为[打开]对话框
       ActiveMovie1.FileName = CommonDialog1.FileName     '设定播放文件和路径
       HA = ActiveMovie1.Height
    End If
    If Index = 1 Then
       ActiveMovie1.MovieWindowSize = 0             '设置为原电影播放窗口大小
       Form1.Height = ActiveMovie1.Height + 1000    '根据影片的大小调整窗体的高度
       Form1.Width = ActiveMovie1.Width + 1700      '根据影片的大小调整窗体的宽度
       Form1.Move 4000, 2000                        '确定窗体的位置
    End If
    If Index = 2 Then
       ActiveMovie1.MovieWindowSize = amvDoubleOriginalSize   '设置为原电影播放窗口的两倍大小
       Form1.Height = ActiveMovie1.Height + HA / 2 + 800      '根据影片的大小调整窗体的高度
       Form1.Width = ActiveMovie1.Width + HA / 2 + 1700       '根据影片的大小调整窗体的宽度
       Form1.Move 1000, 10                                    '确定窗体的位置
    End If
    If Index = 3 Then
       ActiveMovie1.Pause                                     '暂停播放
       ActiveMovie1.FullScreenMode = True                     '设置全屏显示
       Form1.Move 100, 0
       ActiveMovie1.Run                                       '继续播放
    End If
    If Index = 4 Then
       k = 1 - k
       ActiveMovie1.DisplayMode = k               '设置当前播放帧和当前时间却换
    End If
    If Index = 5 Then
       ActiveMovie1.AboutBox                       '显示ActiveMovie1控件的［版权］信息
    End If
    If Index = 6 Then
       S = 3 - S
       ActiveMovie1.Rate = S                      '设置倍速/正常切换
    End If
    If Index = 7 Then
       ActiveMovie1.Stop                         '停止播放影片
       End
    End If
End Sub








