【VB开源代码栏目提醒】:网学会员鉴于大家对VB开源代码十分关注,论文会员在此为大家搜集整理了“aviForm1.frm”一文,供大家参考学习
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 = 2550
ClientLeft = 60
ClientTop = 345
ClientWidth = 4560
LinkTopic = "Form1"
ScaleHeight = 2550
ScaleWidth = 4560
StartUpPosition = 3 '窗口缺省
Begin MSComDlg.CommonDialog dlgOpen
Left = 3600
Top = 240
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.CommandButton cmdStop
Caption = "停止"
Height = 495
Left = 1800
TabIndex = 2
Top = 240
Width = 1215
End
Begin VB.CommandButton cmdPlay
Caption = "播放"
Height = 495
Left = 120
TabIndex = 1
Top = 240
Width = 1215
End
Begin MSComCtl2.Animation anmAVI
Height = 735
Left = 120
TabIndex = 0
Top = 1200
Width = 1095
_ExtentX = 1931
_ExtentY = 1296
_Version = 393216
BackStyle = 1
FullWidth = 73
FullHeight = 49
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdPlay_Click()
'配置一个 CommonDialog 控件,以便用户找到要播放的 .avi 文件。CommonDialog控件的名称是"dlgOpen"。Animation 控件的名称是"anmAVI"。
dlgOpen.Filter = "avi 文件 (*.avi)|*.avi"
dlgOpen.ShowOpen
If dlgOpen.FileName <> "" Then
anmAVI.Open dlgOpen.FileName
anmAVI.Play
End If
End Sub
Private Sub cmdStop_Click()
anmAVI.Stop
End Sub