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();
}
为什么这样也不行?
private void WindowsMediaPlayer1_PlayStateChange(object sender, AxWMPLib._WMPOCXEvents_PlayStateChangeEvent e) { int SelectOne; if (listBox1.SelectedIndex < 0) SelectOne = 1; else SelectOne = listBox1.SelectedIndex + 1; if (listBox1.Items.Count < 0) listBox1.SelectedIndex = 0; if (WindowsMediaPlayer1.playState == WMPLib.WMPPlayState.wmppsStopped) { SelectOne++; WindowsMediaPlayer1.URL = playList[SelectOne]; } }