📄 12.9.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 = "播放声音文件"
ClientHeight = 3195
ClientLeft = 165
ClientTop = 855
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 3 'Windows Default
Begin MSComDlg.CommonDialog CommonDialog1
Left = 4080
Top = 1080
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin MCI.MMControl MMControl1
Height = 615
Left = 240
TabIndex = 2
Top = 2400
Width = 4215
_ExtentX = 7435
_ExtentY = 1085
_Version = 393216
DeviceType = ""
FileName = ""
End
Begin VB.Label Label2
AutoSize = -1 'True
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 360
TabIndex = 1
Top = 1320
Width = 120
End
Begin VB.Label Label1
AutoSize = -1 'True
BeginProperty Font
Name = "楷体_GB2312"
Size = 18
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 360
TabIndex = 0
Top = 480
Width = 180
End
Begin VB.Menu fileopen
Caption = "打开文件"
Begin VB.Menu WavFile
Caption = "wav文件"
End
Begin VB.Menu MidFile
Caption = "mid文件"
End
End
Begin VB.Menu exit
Caption = "退出"
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub exit_Click()
End
End Sub
Private Sub MidFile_Click()
CommonDialog1.Filter = "MID File(*.MID)|*.mid"
CommonDialog1.ShowOpen
If CommonDialog1.FileName <> "" Then
MMControl1.FileName = CommonDialog1.FileName
MMControl1.DeviceType = "Sequencer"
MMControl1.Notify = False
MMControl1.Wait = True
MMControl1.Shareable = False
MMControl1.Command = "Open"
Label1.Caption = "正在播放MID文件"
Label2.Caption = CommonDialog1.FileName
End If
End Sub
Private Sub WavFile_Click()
CommonDialog1.Filter = "Wave File(*.WAV)|*.wav"
CommonDialog1.ShowOpen
If CommonDialog1.FileName <> "" Then
MMControl1.FileName = CommonDialog1.FileName
MMControl1.DeviceType = "WaveAudio"
MMControl1.Notify = False
MMControl1.Wait = True
MMControl1.Shareable = False
MMControl1.Command = "Open"
Label1.Caption = "正在播放WAV文件"
Label2.Caption = CommonDialog1.FileName
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -