Solved

WindowsMediaPlayer1 Repeat Track

Posted on 2009-05-14
5
1,293 Views
Last Modified: 2012-05-07
Hi, I've been using the Windows Media Player imported from the library and what I'm having problems with is Repeating the Track.

now I've figured out the loop which is

form1.WindowsMediaPlayer1.settings.setMode('loop',true);

and I have tried this

form1.WindowsMediaPlayer1.settings.playCount:=0;

and

form1.WindowsMediaPlayer1.settings.playCount:=999;


though still it doesn't stay on the same track or repeat the track :( just goes to the next track..

any way of doing thing so it repeats the track active?

0
Comment
Question by:eNarc
  • 3
5 Comments
 
LVL 5

Expert Comment

by:wd123
Comment Utility
setMode('loop',true); only form playlist, create your playlist with 1 files and you git it.
0
 
LVL 5

Author Comment

by:eNarc
Comment Utility
lol create it with 1 file in the playlist, and loop that one ;) alright hehe I'll see what I can do :)
0
 
LVL 26

Expert Comment

by:EddieShipman
Comment Utility
Write an OnNotify handle that when you are notified of a Stop, you reset and Play again.
0
 
LVL 26

Accepted Solution

by:
EddieShipman earned 500 total points
Comment Utility
oops, TMEdiaPlayer has the OnNotify.
WindowsMediaPlayer has OnPlayStateChange. Check for wmppsStopped.


procedure TForm1.WMP1PlayStateChange(Sender: TObject;

  NewState: Integer);

begin

  if NewState = wmppsStopped then

  begin

    WMP1.controls.currentPosition := 0;

    WMP1.controls.play

  end;

end;

Open in new window

0
 
LVL 26

Expert Comment

by:EddieShipman
Comment Utility
Oh, BTW, I'm not sure how to keep it from playing if you stop in the middle. I suppose there's a way to capture which button was pressed and don't restart if the stop button was pressed.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now