📄 form1.frm
字号:
VERSION 5.00
Object = "{C1A8AF28-1257-101B-8FB0-0020AF039CA3}#1.1#0"; "MCI32.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form Form1
Caption = "VCD播放器"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "退出"
Height = 375
Left = 1800
TabIndex = 1
Top = 2520
Width = 975
End
Begin MSComDlg.CommonDialog CommonDialog1
Left = 2400
Top = 240
_ExtentX = 847
_ExtentY = 847
_Version = 393216
DefaultExt = ".DAT"
DialogTitle = "打开多媒体文件"
Filter = "*.DAT,*.WAV,*.AVI"
End
Begin MCI.MMControl MMControl1
Height = 495
Left = 600
TabIndex = 0
Top = 1320
Width = 2760
_ExtentX = 4868
_ExtentY = 873
_Version = 393216
PrevEnabled = -1 'True
NextEnabled = -1 'True
PlayEnabled = -1 'True
PauseEnabled = -1 'True
BackEnabled = -1 'True
StepEnabled = -1 'True
StopEnabled = -1 'True
RecordVisible = 0 'False
EjectVisible = 0 'False
DeviceType = ""
FileName = ""
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 Command1_Click()
Unload Me
End Sub
Private Sub Form_Load()
Dim Response As Integer
MMControl1.DeviceType = "MPEGVideo"
CommonDialog1.ShowOpen
'通过对话框选择不同的VCD文件
MMControl1.FileName = CommonDialog1.FileName
'选定要播放的文件
MMControl1.Command = "Open"
MMControl1.Command = "Play"
End Sub
Private Sub Form_Unload(Cancel As Integer)
MMControl1.Command = "close"
End Sub
Private Sub MMControl1_BackClick(Cancel As Integer)
'对Back按钮的功能改进
Dim i As Integer
i = MMControl1.Position - 100
'数值100为后退量,可适当调整
If i < 0 Then
MMControl1.From = 0
Else
MMControl1.From = i
End If
MMControl1.Command = "Play"
End Sub
Private Sub MMControl1_StepClick(Cancel As Integer)
'对Step按钮的功能改进
Dim j As Integer
j = MMControl1.Position + 100
'数值100为前进量,可适当调整
If j > MMControl1.Length Then
MMControl1.From = MMControl1.Length
Else
MMControl1.From = j
End If
MMControl1.Command = "Play"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -