问题描述
privatevoidplayer_PlayStateChange(objectsender,AxWMPLib._WMPOCXEvents_PlayStateChangeEvente){if(player.playState==WMPLib.WMPPlayState.wmppsMediaEnded){intindex=listbox.SelectedIndex;index++;if(index>lst.Count-1){listbox.SelectedIndex=0;player.URL=lst[0];}else{player.URL=lst[listbox.SelectedIndex];listbox.SelectedIndex=index;}}if(player.playState==WMPLib.WMPPlayState.wmppsReady){player.Ctlcontrols.play();//}}
解决方案
解决方案二:
可能是不能在PlayStateChange事件里又修改player.playState试试把代码放到timer
时间: 2024-09-20 07:49:25