PlaylistCollectionPlaylistAdded 事件 AxWindowsMediaPlayer 对象

[与此页面关联的功能(Windows 媒体播放器 SDK)是旧版功能。 它已被 MediaPlayer 取代。 MediaPlayer 已针对Windows 10和Windows 11进行了优化。 Microsoft 强烈建议新代码尽可能使用 MediaPlayer 而不是 Windows 媒体播放器 SDK。 如果可能,Microsoft 建议重写使用旧 API 的现有代码以使用新 API。]

将播放列表添加到播放列表集合时,将发生 PlaylistCollectionPlaylistAdded 事件。

[C#]
private void player_PlaylistCollectionPlaylistAdded(
  object sender,
  _WMPOCXEvents_PlaylistCollectionPlaylistAddedEvent e
)

[Visual Basic]
Private Sub player_PlaylistCollectionPlaylistAdded(
  sender As Object,
  e As _WMPOCXEvents_PlaylistCollectionPlaylistAddedEvent
) Handles player.PlaylistCollectionPlaylistAdded

事件数据

与此事件关联的处理程序的类型为 AxWMPLib._WMPOCXEvents_PlaylistCollectionPlaylistAddedEventHandler。 此处理程序接收 AxWMPLib._WMPOCXEvents_PlaylistCollectionPlaylistAddedEvent 类型的参数,其中包含与此事件相关的以下属性。

属性 说明
bstrPlaylistName System.StringSpecifing 已添加的播放列表的名称。

备注

添加的播放列表的名称可用于使用 IWMPPlaylistCollection 检索相应的播放列表。getByName 方法。

要求

要求
版本
Windows 媒体播放器 9 系列或更高版本
命名空间
AxWMPLib
程序集
AxInterop.WMPLib.dll (AxInterop.WMPLib.dll.dll)

另请参阅

AxWindowsMediaPlayer 对象 (VB 和 C#)

IWMPPlaylistCollection.getByName (VB 和 C#)