• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 197
  • Last Modified:

how can I cause Tmediaplayer to loop continusly in an application

How can I get Tmediaplayer to loop(play a midi endlessly) in an application?
0
annas
Asked:
annas
  • 2
1 Solution
 
SteveWaiteCommented:
any help?
// OnNotify event
procedure TForm1.MediaPlayer1Notify(Sender: TObject);
begin
  with Sender as TMediaPlayer do
  begin
    if Mode = mpStopped
      then playitagain; // whatever
    { Note we must reset the Notify property to True }
    { so that we are notified the next time the }
    { mode changes }
    Notify := True;
  end;
end;


Regards,
Steve
0
 
annasAuthor Commented:
I'll have to hand to you Steve, worked perfectly!
paul :~>
0
 
annasAuthor Commented:
Well done Steve! I still havn't figured away to play it from memory yet. That will have to be the subject of a later question!
Paul
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now