Share via


Windows Media Player 11 SDK IWMPControls.next (VB and C#) 

Windows Media Player SDK banner art

Previous Next

IWMPControls.next (VB and C#)

The next method sets the next item in the playlist as the current item.

  

Parameters

This method takes no parameters.

Return Value

This method does not return a value.

Remarks

If the playlist is on the last entry when next is invoked, the first entry in the playlist will become the current one.

For server-side playlists, this method skips to the next item in the server-side playlist, not the client playlist.

When playing a DVD, this method skips to the next logical chapter in the playback sequence, which may not be the next chapter in the playlist. When playing DVD still images, this method skips to the next image.

Example Code

The following example uses next to move to the next item in the current playlist in response to the Click event of a button. The AxWMPLib.AxWindowsMediaPlayer object is represented by the variable named player.

  
Public Sub nextButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles nextButton.Click

    ' To get all of the available functionality of the player controls, Dim the
    ' value returned by player.Ctlcontrols as a WMPLib.IWMPControls3 interface.
    Dim controls As WMPLib.IWMPControls3 = player.Ctlcontrols

    ' Check first to be sure the operation is valid.
    If (controls.isAvailable("next")) Then

        controls.next()

    End If

End Sub

FakePre-01ef13739bf6470cb547fda8878d8f32-d367af8d60fa4573a9034eccf7c2af76

private void nextButton_Click(object o, System.EventArgs args)
{
    // To get all of the available functionality of the player controls, cast the
    // value returned by player.Ctlcontrols to a WMPLib.IWMPControls3 interface. 
    WMPLib.IWMPControls3 controls = (WMPLib.IWMPControls3)player.Ctlcontrols;

    // Check first to be sure the operation is valid.
    if (controls.get_isAvailable("next"))
    {
        controls.next();
    }
}

Requirements

Version: Windows Media Player 9 Series or later

Namespace: WMPLib

Assembly: Interop.WMPLib.dll (automatically generated by Visual Studio)

See Also

Previous Next