?? 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 frmMCI
Caption = "MCI"
ClientHeight = 2730
ClientLeft = 60
ClientTop = 345
ClientWidth = 4830
LinkTopic = "Form1"
ScaleHeight = 2730
ScaleWidth = 4830
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton cmdExit
Caption = "退出"
Height = 375
Left = 3480
TabIndex = 5
Top = 1800
Width = 735
End
Begin VB.CommandButton cmdClose
Caption = "關(guān)閉"
Height = 375
Left = 2400
TabIndex = 4
Top = 1800
Width = 855
End
Begin VB.TextBox txtDisplay
Height = 390
Left = 120
TabIndex = 3
Top = 120
Width = 4575
End
Begin MSComDlg.CommonDialog CommonDialog1
Left = 0
Top = 2160
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.CommandButton cmdPlayStop
Caption = "播放"
Height = 375
Left = 1440
TabIndex = 2
Top = 1800
Width = 855
End
Begin VB.CommandButton cmdOpen
Caption = "打開"
Height = 375
Left = 480
TabIndex = 1
Top = 1800
Width = 855
End
Begin MCI.MMControl MMControl1
Height = 735
Left = 840
TabIndex = 0
Top = 720
Width = 3975
_ExtentX = 7011
_ExtentY = 1296
_Version = 393216
DeviceType = ""
FileName = ""
End
End
Attribute VB_Name = "frmMCI"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim blnPlay As Boolean
Dim strFileName As String
Private Sub Form_Load()
MMControl1.DeviceType = "AVIVideo"
MMControl1.EjectVisible = False
MMControl1.RecordVisible = False
CommonDialog1.Filter = "動畫文件(*.avi)|*.avi"
End Sub
Private Sub cmdOpen_Click()
CommonDialog1.filename = ""
CommonDialog1.ShowOpen
If CommonDialog1.filename <> "" Then
MMControl1.Command = "close"
MMControl1.filename = CommonDialog1.filename
strFileName = CommonDialog1.filename
txtDisplay.Text = strFileName
MMControl1.Command = "open"
End If
End Sub
Private Sub cmdPlayStop_Click()
If strFileName = "" Then Exit Sub
If blnPlay Then
MMControl1.Command = "stop"
cmdPlayStop.Caption = "播放"
blnPlay = False
Else
MMControl1.Command = "seek"
MMControl1.Command = "play"
cmdPlayStop.Caption = "停止"
blnPlay = True
End If
End Sub
Private Sub cmdClose_Click()
strFileName = ""
MMControl1.Command = "close"
txtDisplay.Text = ""
End Sub
Private Sub cmdExit_Click()
MMControl1.Command = "close"
Unload Me
End Sub
Private Sub MMControl1_Done(NotifyCode As Integer)
cmdPlayStop.Caption = "播放"
blnPlay = False
End Sub
Private Sub MMControl1_PauseClick(Cancel As Integer)
cmdPlayStop.Caption = "播放"
blnPlay = False
End Sub
'
Private Sub MMControl1_PlayClick(Cancel As Integer)
cmdPlayStop.Caption = "停止"
blnPlay = True
End Sub
Private Sub MMControl1_StopClick(Cancel As Integer)
cmdPlayStop.Caption = "播放"
blnPlay = False
End Sub
Private Sub Form_Unload(Cancel As Integer)
MMControl1.Command = "close"
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -