J
Jelly0228
Unregistered / Unconfirmed
GUEST, unregistred user!
大蝦幫我看看﹐為什么我的代碼不能刪除PlayList?我是希望連同產生的wpl文件一同刪除掉。可是下面的代碼根本就沒有用。
if WindowsMediaPlayer1.playlistCollection.getByName('List').count > 0 then
begin
aPlaylist := WindowsMediaPlayer1.playlistCollection.getByName('List').Item(0);
//刪除名為List的PlayList﹔
WindowsMediaPlayer1.playlistCollection.remove(WindowsMediaPlayer1.playlistCollection.getByName('List').Item(0));
end;
然后再創建一個名為List的PlayList
aPlaylist := WindowsMediaPlayer1.playlistCollection.newPlaylist('List')﹔
if WindowsMediaPlayer1.playlistCollection.getByName('List').count > 0 then
begin
aPlaylist := WindowsMediaPlayer1.playlistCollection.getByName('List').Item(0);
//刪除名為List的PlayList﹔
WindowsMediaPlayer1.playlistCollection.remove(WindowsMediaPlayer1.playlistCollection.getByName('List').Item(0));
end;
然后再創建一個名為List的PlayList
aPlaylist := WindowsMediaPlayer1.playlistCollection.newPlaylist('List')﹔