hola brot, gracias por responder, pero no logro entenderte la idea,
Código Delphi
[-]
begin
if lbmusic.Count <> 0 then
Timer2.Enabled := true else
Timer2.Enabled := false;
ejemplo, si la ultima cancion esta en reproduccion, y no hay mas cancion despues de esa, porq es la ultima, quisiera que timer2 quede en false.
Código Delphi
[-]
begin
If MediaPlayer1.position=MediaPlayer1.length then begin
If RandomButton.down=false then begin
If lbmusic.itemindex= lbmusic.items.count then lbmusic.itemindex:= -1;
lbmusic.itemindex:= lbmusic.itemindex + 1;
end;
If RandomButton.down=true then begin
Randomize;
lbmusic.itemindex:= Random(lbmusic.items.count);
end;
lstbprogramas.ItemIndex := -1;
MediaPlayer1.filename:= lbmusic.items[lbmusic.itemindex];
MediaPlayer1.open;
MediaPlayer1.play;
end;
end;
saludos