procedure TForm1.MediaPlayer1Notify(Sender: TObject);
begin
if MediaPlayer1.Mode=mpstopped then
begin
......
......//必要的话重取、文件
MediaPlayer1.Play;
end;
end;
if dlgOpen_1.Execute=true then
begin
while pos('已停止',wmp_1.status)=0 do
begin
wmp_1.URL:=dlgOpen_1.FileName;
while pos('正在打开媒体',wmp_1.status)>0 do
Application.ProcessMessages;
while pos('正在播放',wmp_1.status)>0 do
Application.ProcessMessages;
wmp_1.URL:=dlgOpen_1.FileName;
end;