Thread View: borland.public.delphi.multimedia
4 messages
4 total messages
Started by Serra
Tue, 13 May 2008 17:53
Find Out M.Player stop
Author: Serra
Date: Tue, 13 May 2008 17:53
Date: Tue, 13 May 2008 17:53
7 lines
1007 bytes
1007 bytes
D7 How can i find out M.Player stop ( song finished ) Is there a way to re-start MP ( re-play same song when MP finished the song ) Thanks
Re: Find Out M.Player stop
Author: dave
Date: Tue, 13 May 2008 18:25
Date: Tue, 13 May 2008 18:25
38 lines
2180 bytes
2180 bytes
you have to set mediaplayer's notify to true. Then write code to handle the
restart of the song in the OnNotify event. Dont forget after your code you
need to set mediaplayer.notify := true; again or it will not continue to
notify you. You can use the mode property to determine when the song has
stopped.
so i put the line
Notify := True;
after the mediaplayer.play command.
here is the code from my mediaplayer.OnNotify event:
procedure TForm1.MediaPlayer1Notify(Sender: TObject);
begin
with Sender as TMediaPlayer do
begin
lblStatus.Caption := ModeStr[Mode];
if uppercase(lblStatus.Caption) = 'STOPPED' then begin
//do something here
end;
//remember this line of code!!!!!
Notify := True;
end;
end;
hope this helps,
Dave
"Serra" <serra@serra.com> wrote in message
news:4829d58b@newsgroups.borland.com...
> D7
>
> How can i find out M.Player stop ( song finished )
> Is there a way to re-start MP ( re-play same song
> when MP finished the song )
>
> Thanks
>
>
Re: Find Out M.Player stop
Author: Serra
Date: Tue, 13 May 2008 18:47
Date: Tue, 13 May 2008 18:47
1 lines
961 bytes
961 bytes
Thank you so much Dave.
Re: Find Out M.Player stop
Author: Remy Lebeau (TeamB)
Date: Tue, 13 May 2008 20:11
Date: Tue, 13 May 2008 20:11
10 lines
1206 bytes
1206 bytes
"dave" <richocet2@hotmail.com> wrote in message
news:4829dd24@newsgroups.borland.com...
> if uppercase(lblStatus.Caption) = 'STOPPED' then begin
if Mode = mpStopped then begin
Gambit
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads