Новый участник
Сообщения: 2
Благодарности: 1
|
Профиль
|
Отправить PM
| Цитировать
Используй ListBox и OpenDialog
вот код кнопы добавления файлов в плейлист:
procedure TForm1.Button1Click(Sender: TObject);
var i:integer;
begin
if OpenDialog1.Execute then
begin
for i:=0 to OpenDialog1.Files.Count-1 do
begin
ListBox1.Items.Add(OpenDialog1.Files.Strings[i]);
end;
end;
end;
Двойной клик по плейлисту:
procedure TForm1.ListBox1DblClick(Sender: TObject);
begin
if ListBox1.Items.Strings[ListBox1.ItemIndex] <> ''
then
begin
MediaPlayer1.FileName:=ListBox1.Items.Strings[ListBox1.ItemIndex];
MediaPlayer1.Open;
MediaPlayer1.Play;
end;
end;
|
Отправлено: 00:48, 30-08-2008
| #20
|