Autor Beitrag
WhoIsMe
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 16



BeitragVerfasst: Mi 08.06.05 17:26 
hi leutz,
ich wollte einfach ma aus Spass ne kleinen MP3-Player schreiben.
Alles funktioniert auch schön bis....
zum Minimieren
Dann spielt er das Lied zwar noch zu Ende aber gibt dann den Geist auf bzw. bleibt hängen führt keine weiteren Aktionen aus
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
procedure TForm1.MediaPlayer1Notify(Sender: TObject);
begin
if LoopAktiv=true then
begin
if FileExists(Listbox2.items[Loopstelle+1]) then
begin
          Loopstelle:=Loopstelle+1;
          with MediaPlayer1 do begin
             filename:=Listbox2.items[Loopstelle];
             open;
             play;
             end;
end
else

begin
Loopstelle:=0;
      with MediaPlayer1 do begin
      filename:=Listbox2.items[Loopstelle];
      open;
      play;
      end;
end;
end;

end;

Diese Aktion soll allerdings auch nach dem minimieren des Programms ausgeführt werden.
Also danke schonma für Hilfe :)
Mfg
Wh0

Moderiert von user profile iconGausi: Code- durch Delphi-Tags ersetzt.
patrick
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1481

WIN2k, WIN XP
D6 Personal, D2005 PE
BeitragVerfasst: Do 09.06.05 08:32 
wird vielleicht loopactive? irgendwo auf false gestellt?

_________________
Patrick
im zweifelsfall immer das richtige tun!!!
ManuelGS
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 173

Win XP HE, Suse Linux
D6, D7, D2005 Personal
BeitragVerfasst: Mo 13.06.05 17:44 
hi!
ich vermute mal, diese methode "procedure TForm1.MediaPlayer1Notify(Sender: TObject);" ist das notify-ereignis...
ich würde vorsichtig sein, einen mp3-player in ein ereignis zu packen. versuch mal, den code in eine selbsterstellte methode zu schreiben.

Gruß, Manuel

_________________
"Leben ist gänzlich Bühne und Spiel; so lerne denn spielen
und entsage dem Ernst - oder erdulde das Leid." - Palladas von Alexandria
alias5000
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2145

WinXP Prof SP2, Ubuntu 9.04
C/C++(Code::Blocks, VS.NET),A51(Keil),Object Pascal(D2005PE, Turbo Delphi Explorer) C# (VS 2008 Express)
BeitragVerfasst: Mo 13.06.05 17:48 
Die anwendung wird doch beim minimieren angehalten oder? d.h., dass die Anwendung dann nix mehr machen kann oder?
ManuelGS
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 173

Win XP HE, Suse Linux
D6, D7, D2005 Personal
BeitragVerfasst: Mo 13.06.05 18:15 
@alias5000
also meine programme rechnen im hintergrund schön weiter, wie sie sollen. winamp funktioniert minimiert auch noch.

ich denke einfach, der code muss da aus dem ereignis raus. für mich macht das sowieso keinen sinn, den in ein ereignis zu stecken!?

_________________
"Leben ist gänzlich Bühne und Spiel; so lerne denn spielen
und entsage dem Ernst - oder erdulde das Leid." - Palladas von Alexandria
WhoIsMe Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 16



BeitragVerfasst: Di 14.06.05 15:54 
:shock:
Wie soll ich etwas im Programm ablaufen lassen ohne ein Ereignis zu verwenden? T.t
Ist man nicht auf ereignisse á la OnClick,OnApply u.s.w. angewiesen oder kann man auch Aktionen außerhalb solcher Ereignisse ausführen :?: :?:
mfg Wh0
PS: @alias5000 jo das heisst es, aber es gibt ja auch Prozesse bzw. Programme die im minimierten Zustand weiter laufn