Autor Beitrag
DelphiDelphin
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 181



BeitragVerfasst: So 17.04.05 16:09 
Am ende des liedes soll das programm schliessen kann mir jemand helfen :roll:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
procedure TForm3.BitBtn1Click(Sender: TObject);
begin
with Mediaplayer1 do
begin
Autorewind:= True;
Filename:= (Filelistbox1.FileName);
try
Open;
play;
finally

end;

end;

end;



Moderiert von user profile iconGausi: Topic aus Sonstiges verschoben am Mo 18.04.2005 um 09:53
bockwurst
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 191

win98 /XP
D1 D5 Prof DE2005PE
BeitragVerfasst: Mo 18.04.05 08:17 
Du hast wohl viele Möglichkeiten, dein Problem zu lösen. Als erstes kannst du mit Mode abfragen, ob er sich noch am Spielen befindet (mpPlaying). Oder du kannst Einfach die Endposition dir bestimmen und nach
der aktuellen Position (Trackposion) schauen. Dies kannst du in einer Schleife mit TTimmer wohl am
besten bewerkstelligen.
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Mo 18.04.05 08:51 
So gehts auch:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
MediaPlayer1.Notify := False;
mediaplayer1.FileName:='MeinLied.mp3';
mediaplayer1.Open;
MediaPlayer1.Play;
Mediaplayer1.OnNotify:=MediaPlayer1Notify_CloseForm;
MediaPlayer1.Notify := True;



procedure TForm1.MediaPlayer1Notify_CloseForm(Sender: TObject);
begin
  Form1.close;
end;

Nachteil: es wird nicht nur dann geschlossen, wenn das Lied zuende ist, sondern auch dann, wenn der USer z.B. einen Button am Mediaplayer drückt...

_________________
We are, we were and will not be.
Harry M.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 754

Win 2000, XP
D2005
BeitragVerfasst: Di 19.04.05 03:07 
frag doch die position den mplayers ab... (mplayer1.position) und wenn er den titel zuend hat: close. ich habe das zwar grad nicht getest sollte aber gehen

_________________
Gruß Harry
Et spes me per dies sine te ducat et amor me ferat, si dolor spem tollit.
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5285
Erhaltene Danke: 29

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Do 21.04.05 11:44 
im swissdelphicenter steht sowas, da wirst du fündig :o