VB中播放器控件WindowsMediaPlayer在哪儿
展开全部
在空白处单击右键,单击"选择项...",在选项卡里选COM组件,点Windows Media Player。
追问
如果.com组件里没有应该怎么办啊
还有啊 可不可以麻烦你写一个音乐播放器的代码啊
追答
单击"浏览",并设置文件路径为系统盘:\windows\system32 选择"WMP.dll"
代码
添加 CmdPlay cmdpause cmdstop cmdopen opendialog1 wmp1
dim i as integer
Private Sub CmdPlay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdPlay.Click
wmp1.Ctlcontrols.play()
End Sub
Private Sub CmdPause_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdPause.Click
wmp1.Ctlcontrols.pause()
End Sub
Private Sub CmdStop_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdStop.Click
wmp1.Ctlcontrols.stop()
End Sub
Private Sub CmdOpen_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cmdopen.Click
on error goto i
opendialog1.showdialog
wmp1.url=opendialog1.filename
i:
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询