Board index » delphi » play or not play

play or not play

Hello all
I have a MediaPlayer1 in a form then I check it is play or not to stop it
by this code
===============================
var TimerOver:Word;
.
.
procedure TForm1.Timer1Timer(Sender: TObject);

if TimerOver = 3 and Form2.MediaPlayer1.Play then
  begin

    Form2.MediaPlayer1.stop;
    { disable the timer, as we are done }
    Timer1.Enabled := False;
  end
  else
    Inc(TimerOver);
end;
==============================
however, the procedure Form2.MediaPlayer1.Play is not Boolean so there is
error.

Could you please help to solve this problem
Thank you
Nhuyen

http://www.zfree.co.nz

 

Re:play or not play


Quote
In article <3b58da7...@zfree.co.nz>, "nhuyen" <sonphu...@zfree.co.nz> writes:
>if TimerOver = 3 and Form2.MediaPlayer1.Play then
>  begin

if (TimerOver = 3) and (Form2.MediaPlayer1.Mode = mpPlaying) then begin
  // etc etc

Read Delphi help on TMediaPlayer.

Alan Lloyd
alangll...@aol.com

Other Threads