看看这些???
Vision (2003-05-07 13:15:00)
procedure TfrmMain.MediaPlayerNotify(Sender: TObject);
begin
Case MediaPlayer1.NotifyValue of
nvSuccessful :
begin
MediaPlayer.StartPos:=MediaPlayer.Start;
MediaPlayer1.Notify := True;
MediaPlayer1.Play;
end;
end
end;
procedure TfrmMain.PlayMedia(FileName:string);
begin
MediaPlayer1.Close;
MediaPlayer1.FileName :=FileName;
MediaPlayer1.Open;
MediaPlayer1.Notify := True;
MediaPlayer1.Play;
end;
以前一个程序中提取出来的,绝对满足你的要求!
LeonSu (2001-02-12 23:07:00)
Test OK!
...
MediaPlayer1.FileName:='Demo.wav';
MediaPlayer1.Open;
MediaPlayer1.Notify:=True;
MediaPlayer1.Play;
...
procedure TForm1.MediaPlayer1OnNotify(...);
begin
If MediaPlayer1.Position=MediaPlayer1.Length then
begin
MediaPlayer1.Rewind;
MediaPlayer1.Play;
end;
end;