• WindowsMediaPlayer播放完毕可以播放下一个


    if (e.newState = WMPLib.WMPPlayState.wmppsReady)

    {

    AxWindowsMediaPlayer1.Ctlcontrols.play();

    如果是就表示以播放完毕可以播放下一个. 

     If e.newState = WMPLib.WMPPlayState.wmppsStopped Then
                AxWindowsMediaPlayer1.URL = ListBox1.Items(index).ToString //index是你下一首的
                AxWindowsMediaPlayer1.Ctlcontrols.play()       

    *******************************************************************************

     Private Sub AxWindowsMediaPlayer1_PlayStateChange(ByVal sender As Object, ByVal e As AxWMPLib._WMPOCXEvents_PlayStateChangeEvent) Handles AxWindowsMediaPlayer1.PlayStateChange

            If e.newState = WMPLib.WMPPlayState.wmppsStopped Then
                If ListBox1.SelectedIndex = ListBox1.SelectedIndex - 1 Then
                    AxWindowsMediaPlayer1.Ctlcontrols.stop()
                Else

                    ListBox1.SelectedIndex = ListBox1.SelectedIndex + 1
                    AxWindowsMediaPlayer1.URL = ListBox1.Items(ListBox1.SelectedIndex).ToString 'index是你下一首的

                    AxWindowsMediaPlayer1.Ctlcontrols.play()

                End If
            End If

     

        End Sub

    ****************************************************************

    https://social.msdn.microsoft.com/Forums/zh-CN/fb04d284-d167-4b4b-a610-dd87e1580592/listboxaxwindowsmediaplayer?forum=vbasiczhchs

    http://bbs.bccn.net/thread-132392-1-1.html

  • 相关阅读:
    XJTUOJ13 (数论+FFT)
    ZOJ3956 ZJU2017校赛(dp)
    ZOJ3953 ZJU2017校赛(贪心)
    2014ACM/ICPC亚洲区西安站现场赛 F color(二项式反演)
    LOJ10129
    loj 10127最大数
    noip 选择客栈
    LOJ10121 与众不同
    CQOI 2006 简单题
    校门外的树
  • 原文地址:https://www.cnblogs.com/wanzhongjun/p/6273479.html
Copyright © 2020-2023  润新知