Delphi-Quellcode:
procedure MediaPlayer1Notify(Sender: TObject);
begin
If form5.MediaPlayer1.Notify = True then
Begin
form5.MediaPlayer1.Play;
End
else
Begin
form5.MediaPlayer1.Stop;
End;
end;
(...)
Delphi-Quellcode:
procedure TForm5.FormActivate(Sender: TObject);
begin
musikwahl:=random(5)+1;
form5.Mediaplayer1.Notify:=true;
form5.Mediaplayer1.FileName := 'c:\add\data\musik\track'+inttostr(musikwahl)+'.mp3';
form5.Mediaplayer1.Open;
form5.Mediaplayer1.Play;
end;
Nach beenden eines mp3-tracks, bleibt der player still...obwohl notify=true ist.....