怎么让播放器放完一首歌后..自动放一首歌?
if(axWindowsMediaPlayer1.playstate == WMPLib.WMPPlayState.wmppsMediaEnded)axWindowsMediaPlayer1.Url=ListBox1.SelectedIndex.Tostring();
不行啊...
我是新手请大哥帮下
private void axWindowsMediaPlayer1_PlayStateChange(object sender, AxWMPLib._WMPOCXEvents_PlayStateChangeEvent e)
{
if (axWindowsMediaPlayer1.playState == WMPLib.WMPPlayState.wmppsMediaEnded)
timer1.Start();
}
private void timer1_Tick(object sender, EventArgs e)
{
listBox2 .SelectedIndex++;
axWindowsMediaPlayer1.URL = listBox2.SelectedIndex.ToString();
}
为什么这样也不行?