求一VB用WindowsMediaPlayer1播放程序
1个回答
展开全部
Private Sub Command1_Click() CommonDialog1.Filter = "mp3(*.mp3)|*.mp3" CommonDialog1.ShowOpen If CommonDialog1.FileName = "" Then MsgBox "请选择一个mp3文件!" Else WindowsMediaPlayer1.URL = CommonDialog1.FileName WindowsMediaPlayer1.Controls.play End If End Sub Private Sub Form_Load() WindowsMediaPlayer1.Visible = False End Sub 要先在工程->部件里添加Microsoft Common Dialog Control 6.0和Windows Media Player控件引用
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询