在windowsmediaplayer的播放列表中怎么播放选择的文件,是用个方法,高手给点提示。
Dim nMedia As IWMPMedia
Set nMedia = WindowsMediaPlayer1.newMedia("文件路径")'此处循环添加
WindowsMediaPlayer1.currentPlaylist.appendItem nMedia '添加播放列表
WindowsMediaPlayer1.Controls.play '开始播放
怎么播放鼠标选择的列表中的文件。

解决方案 »

  1.   

    好像是CurrentItemChange事件获取当前选中IWMPMedia,然后用
    WindowsMediaPlayer1.Controls.playItem 当前IWMPMedia
      

  2.   

    读取或设置WindowsMediaPlayer1.Controls.currentItem不就完了。
    WindowsMediaPlayer1.Controls.playItem WindowsMediaPlayer1.Controls.currentItem '播放当前的文件
    WindowsMediaPlayer1.Controls.currentItem=WindowsMediaPlayer1.Controls.Next '移到下一个