Autor Beitrag
klausiemausie
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 98

Win XP, Win Vista Ultimate
Delphi 6
BeitragVerfasst: So 15.02.09 14:59 
ich habe ein kleines problem, und zwar möchte ich per klick auf einen button ein video abspielen, dabei soll aber die hintergrundmusik gestoppt werden. das is ja an sich nich das problem, wenn die hintergrundmusik läuft, wird sie gestoppt und das video fängt auch an. aber, wenn die hintergrundmusik beim starten des programms noch gar nich angemacht wurde, kommt eine fehlermeldung, weil er ja den mediaplayer 1 nicht stoppen kann, weil ja kein lied läuft. nun möchte ich ne einfache entscheidungsstruktur einfügen, die beinhaltet, dass wenn der mediaplayer was spielt, also aktiv is, gestoppt wird, wie drücke ich das am besten aus?
gruss klaus
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: So 15.02.09 15:10 
Notify

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

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: So 15.02.09 15:11 
Merk dir doch einfach in einer weiteren Variable oder Property, ob du gerade abspielst oder nicht. ;-)

_________________
We are, we were and will not be.
klausiemausie Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 98

Win XP, Win Vista Ultimate
Delphi 6
BeitragVerfasst: So 15.02.09 15:20 
geht nich einfach irgendwas á la if mediaplayer.play=true then do bla bla?
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 480

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: So 15.02.09 15:22 
Keine Ahnung, aber schau dir mal Notify (siehe Posting von user profile iconBlackheart666) an. Vom Mediaplayer hab ich kaum Ahnung, aber dieser Begriff taucht immer wieder mal auf, wenn es um sowas geht. ;-)

_________________
We are, we were and will not be.
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19341
Erhaltene Danke: 1752

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: So 15.02.09 16:19 
ausblenden Delphi-Quelltext
1:
if MediaPlayer1.Mode = mpPlaying then					
;-)