• 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

  • 相关阅读:
    2019-9-2-win10-uwp-Markdown
    2018-8-10-控件
    2018-8-10-win10-uwp-dataGrid
    2018-2-13-win10-uwp-hashcash
    2018-2-13-git-cannot-lock-ref
    UCOSIII系统内部任务
    UCOSIII时间片轮转调度
    Keil MDK fromelf生成bin文件
    UCOS内存管理
    uavcan扩展帧格式 zubax
  • 原文地址:https://www.cnblogs.com/wanzhongjun/p/6273479.html
Copyright © 2020-2023  润新知