程
程云
Unregistered / Unconfirmed
GUEST, unregistred user!
各位老兄台,都用过Delphi的SYSTEM页中的MediaPlayer吧?
if FileExists(ExtractFilePath(Application.Exename)+'RunLib/T01.AVI') then
begin
MediaPlayer1.FileName:=(ExtractFilePath(Application.Exename)+'RunLib/T01.AVI');
MediaPlayer1.Open;
MediaPlayer1.Notify:=true;
MediaPlayer1.Display:=Form2;
MediaPlayer1.DisplayRect:=Form2.ClientRect;
MediaPlayer1.Play;
end;
然后如下让它循环
procedure TForm2.MediaPlayer1Notify(Sender: TObject);
begin
if MCIStop=1 then
Exit;
if MediaPlayer1.Mode=mpStopped then
begin
MediaPlayer1.Rewind;
MediaPlayer1.Play;
end;
MediaPlayer1.Notify:=true;
end;
这样没错吧!在NT上是没有问题,可在win98上就不行,这是为什么?如何解决?
if FileExists(ExtractFilePath(Application.Exename)+'RunLib/T01.AVI') then
begin
MediaPlayer1.FileName:=(ExtractFilePath(Application.Exename)+'RunLib/T01.AVI');
MediaPlayer1.Open;
MediaPlayer1.Notify:=true;
MediaPlayer1.Display:=Form2;
MediaPlayer1.DisplayRect:=Form2.ClientRect;
MediaPlayer1.Play;
end;
然后如下让它循环
procedure TForm2.MediaPlayer1Notify(Sender: TObject);
begin
if MCIStop=1 then
Exit;
if MediaPlayer1.Mode=mpStopped then
begin
MediaPlayer1.Rewind;
MediaPlayer1.Play;
end;
MediaPlayer1.Notify:=true;
end;
这样没错吧!在NT上是没有问题,可在win98上就不行,这是为什么?如何解决?