Export (0) Print
Expand All
Expand Minimize
0 out of 1 rated this helpful - Rate this topic

AxWindowsMediaPlayer.currentPlaylist property

The currentPlaylist property gets or sets the current IWMPPlaylist interface that provides an easy way to organize and manipulate media items in a list.

Syntax



public IWMPPlaylist currentPlaylist {get; set;}

Property value

The WMPLib.IWMPPlaylist interface that provides access to the current playlist.

Remarks

If the IWMPSettings.autoStart property (also accessed via AxWindowsMediaPlayer.settings.autoStart) is true, playback begins automatically whenever you set currentPlaylist.

This property takes an IWMPPlaylist interface, which can be acquired in several ways, such as by getting the value from the IWMPPlaylistArray.Item or IWMPPlaylistCollection.newPlaylist properties. To load a playlist item using a file name, set the URL property or use AxWindowsMediaPlayer.newPlaylist.

Examples

The following example retrieves the first playlist in the library and uses the currentPlaylist property to set the retrieved playlist as the current playlist, and display its name. The AxWMPLib.AxWindowsMediaPlayer object is represented by the variable named player.



// Get an interface to the first playlist from the library. 
WMPLib.IWMPPlaylist firstPlaylist = player.playlistCollection.getAll().Item(0);

// Make the retrieved playlist the current playlist.
player.currentPlaylist = firstPlaylist;

// Display the name of the current playlist.
currentPlaylistLabel.Text = ("Found first playlist. Name = " + player.currentPlaylist.name);


Requirements

Version

Windows Media Player 9 Series or later

Namespace

AxWMPLib

Assembly

AxInterop.WMPLib.dll (AxInterop.WMPLib.dll.dll)

See also

AxWindowsMediaPlayer Object (VB and C#)
AxWindowsMediaPlayer.newPlaylist (VB and C#)
AxWindowsMediaPlayer.settings (VB and C#)
IWMPPlaylist Interface (VB and C#)
IWMPPlaylistArray.Item (VB and C#)
IWMPPlaylistCollection.newPlaylist (VB and C#)
IWMPSettings.autoStart (VB and C#)

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.