Autor Beitrag
stigge
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 426

WinXP
Delphi 2007
BeitragVerfasst: So 04.02.07 20:25 
Wenn der Mediaplayer das laufende Lied fertig abgespielt hat, soll er button1 verstecken. Wie geht das? (den Button verstecken kann ich schon, nur als Beispiel)
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: So 04.02.07 20:43 
Schau mal nach MediaPlayer Position.

_________________
Blackheart666
Der Irrsinn ist bei Einzelnen etwas Seltenes, - aber bei Gruppen, Parteien, Völkern, Zeiten die Regel. (Friedrich Nietzsche)
klemme
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 37



BeitragVerfasst: So 04.02.07 23:02 
einfach beim ereignis "OnNotify" den Befehl zum Verstecken eingeben

am besten so:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
procedure TForm1.MediaPlayer1Notify(Sender: TObject);
begin
 if mediaplayer.position = mediaplayer.length then
 Button1.hide;
end;

_________________
ich werde das Unternehmen übernehmen
stigge Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 426

WinXP
Delphi 2007
BeitragVerfasst: Mo 05.02.07 17:18 
Und wann löst sich Onnotify immer aus?
JayEff
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: Mo 05.02.07 17:49 
F1 im OI drücken:
Das Ereignis OnNotify wird ausgelöst, wenn die Ausführung einer Methode zur Steuerung des Media-Players beendet ist.

Delphi-Syntax:

property OnNotify: TNotifyEvent;

C++ Syntax:

__property Classes::TNotifyEvent OnNotify = {read=FOnNotify, write=FOnNotify};

Beschreibung

OnNotify tritt ein, sobald die Ausführung einer Methode zur Steuerung des Media-Players (Back, Close, Eject, Next, Open, Pause, PauseOnly, Play, Previous, Resume, Rewind, StartRecording, Step oder Stop) beendet ist. Voraussetzung dafür ist allerdings, dass die Eigenschaft vor dem Aufruf der Methode auf true gesetzt wurde. Nach einem OnNotify-Ereignis muss die Eigenschaft Notify erneut auf true gesetzt werden, damit das nächste OnNotify-Ereignis eintreten kann.

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.
stigge Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 426

WinXP
Delphi 2007
BeitragVerfasst: Mo 05.02.07 17:54 
Danke! Aber manchmal zeigt er absolut falsche Werte an. Kann man die Länge sonst noch irgendwie auslesen?
stigge Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 426

WinXP
Delphi 2007
BeitragVerfasst: Mo 05.02.07 18:15 
Bei einigen Lieder funktioniert's aber bei anderen nicht....
OK, neues Thema^^