c# windows media player怎么实现播完歌自动自动下一首?

2025-06-28 07:55:27
推荐回答(1个)
回答1:

这是点击节哪首歌

int index = listBox1.SelectedIndex;
listBox1.SelectedIndices.Clear();
index++;
if (index == listBox1.Items.Count)
{
index = 0;
}

listBox1.SelectedIndex = index;
musicPlayer.URL = listPath[index];
musicPlayer.Ctlcontrols.play();