可以
我在win2000下就是用这个播放MP3的
我在win2000下就是用这个播放MP3的
解决方案 »
- ASP网站 数据库连接问题
- 请问怎样做像TM2008的关闭按钮,有渐隐渐现效果的按钮?
- 如何设定文件夹为只读共享
- 我在公司运行的程序拷回到家中自己的机子,出现了什么:未发现...... 这是什么问题啊。进来详细看一下。谢
- 一个查询怎么写才能在access和sql都能用的?
- 用listview显示数据.怎么才能使数据按照单双行背景颜色不同.
- 请教一下:报表中输出sstab中的图片
- 寻求方法:象FoxPro中一样设置删除标记(以备恢复)
- 用此源码,窗体大小将与分辩率无关! 谁要??
- 请问vb6做的程序怎样才能在Win2000下运行?
- 如何让ComboBox 控件里的内容显示完毕
- Randomize函数如何使用?最好有个例子,解释详细些。
' (To add the Common Dialog Box to your tools menu, go to Project->Components (or press CTRL-T)
' and select Microsoft Common Dialog control)
Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long
Dim Alias As String
Private Sub Form_Load()
'KPD-Team 1998
'URL: http://www.allapi.net/
'E-Mail: [email protected]
Const PlayTime = 10
'Set the common dialog box' title
CDBox.DialogTitle = "Choose your midi-file"
'Set the filter
CDBox.Filter = "Midi-files (*.mid)|*.mid"
'Show the 'Open File'-dialog
CDBox.ShowOpen
'Extract an alias from the file
Alias = Left$(CDBox.FileTitle, Len(CDBox.FileTitle) - 4) 'play midi
R% = mciSendString("OPEN " + CDBox.filename + " TYPE SEQUENCER ALIAS " + Alias, 0&, 0, 0)
R% = mciSendString("PLAY " + Alias + " FROM 0", 0&, 0, 0)
R% = mciSendString("CLOSE ANIMATION", 0&, 0, 0) 'play midi for 10 secs
t = Timer
Do: DoEvents: Loop Until Timer > t + PlayTime 'stop midi and close it
R% = mciSendString("OPEN " + CDBox.filename + " TYPE SEQUENCER ALIAS " + Alias, 0&, 0, 0)
R% = mciSendString&("STOP " + Alias, 0&, 0, 0)
R% = mciSendString&("CLOSE ANIMATION", 0&, 0, 0)
End Sub
mciSendString("set mp3 Time format hms ", vbnull, 0, 0)