禄劝县政府副县长:MMControl中播放文件位置

来源:百度文库 编辑:中科新闻网 时间:2024/04/30 06:30:32
Private Sub Form_Load()
MMControl1.Notify = False
MMControl1.Wait = True
MMControl1.Shareable = False
MMControl1.DeviceType = "WaveAudio"
MMControl1.filename = "C:\WIN98\MEDIA\Ctmelody.wav"

MMControl1.Command = "Open"
MMControl1.Command = "Play"
End Sub

Private Sub Form_Unload(Cancel As Integer)
MMControl1.Command = "Close"
End Sub

我知道MMControl怎么用了,但是如果我把声音和程序文件移动到别的地方,比如我将音乐文件和程序同时移动到了别的地方,声音就没有了,怎么解决这个问题呢?
app.path我不太会用,能否写仔细点儿

用app.path就可以了,它的做用是取程序运行的当前路径