在form中 Ctrl+T 勾选microsoft common dialog control 6.0 microsoft multimedia control 6.0 并添加 添加timer 代码如下: Private Sub Form_Load() timer1.interval=1000 '添加 CommonDialog1.Filter = "(*.mp3,*.wma)|*.mp3;*.wma|" CommonDialog1.ShowOpen If CommonDialog1.FileName = "" Then Exit Sub Else '更改 MMControl1.FileName = CommonDialog1.FileName MMControl1.Command = "open" MMControl1.Command = "play" End If End Sub
Private Sub Timer1_Timer() If MMControl1.Position = MMControl1.Length Then MMControl1.Command = "prev" MMControl1.Command = "play" End If End Sub 哈!! 效果看下面:
SrDH3Hns.rar
(3.98 KB)
[此贴子已经被作者于2005-8-26 9:11:49编辑过]
辉少QQ:469781880 博客:http:///bbs/boke.asp?25189.index.html