Autor Beitrag
Lui
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 84

Win XP, Win 2000, Linux
D7
BeitragVerfasst: Mi 04.06.03 12:41 
Hallo,

habe eine dbGrid mit einigen *.mp3 Dateien und kann diese OnDoppelklick auch abspielen.

ausblenden Quelltext
1:
2:
3:
Statusbar1.Panels[1].text := Mediaplayer1.Filename;
Mediaplayer1.open;
Mediaplayer1.play;


Somit wird bei einem Doppelklick auf die entsprechende Datei diese ausgeführt.

Nur die buttons werden nicht mit einbezogen. D.h. wenn eine *.mp3 per Doppelklick abgespielt wird, bleiben die buttons (btPlay, btStop) in ihrem normalen Status. Der btPlay soll aber disabled (btStop soll enabled) werden sobald eine *.mp3 abgespielt wird.

Wie mach ich das, habs so schonmal versucht:
ausblenden Quelltext
1:
Mediaplayer1.EnabledButtons := [btPlay];					


Doch irgendwie scheint er dies zur Laufzeit nicht zu übernehmen...
Wieso? Oder brauche ich was anderes?

Schonmal Danke im Vorraus, hoffe jemand kann mir weiter helfen.

MfG

Lui

_________________
Während der C Progga sich fragt wie er es machen soll, fragt der Delphi Progga sich was soll ich machen...
patrick dee
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 311

Win 98SE, WinXP
D3,D6
BeitragVerfasst: Mi 04.06.03 14:29 
hi so aus dem bauch heraus

if mediaplayer1.play then
btnplay.enabled:= false
else
btnplay.enabled:=true;
also so in etwa würde ich das machen

_________________
Glauben heißt nichts wissen ...
Lui Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 84

Win XP, Win 2000, Linux
D7
BeitragVerfasst: Mi 04.06.03 14:50 
Titel: Ok ich versuchs mal
Ok ich versuch das dann mal.

Vielen Dank!

MfG

Lui

_________________
Während der C Progga sich fragt wie er es machen soll, fragt der Delphi Progga sich was soll ich machen...
patrick dee
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 311

Win 98SE, WinXP
D3,D6
BeitragVerfasst: Mi 04.06.03 15:54 
habe dir den code wie es geht geschickt

ciao

patrick

_________________
Glauben heißt nichts wissen ...
patrick dee
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 311

Win 98SE, WinXP
D3,D6
BeitragVerfasst: Mi 04.06.03 15:54 
der erste vorschlag von mir war mist :oops:

_________________
Glauben heißt nichts wissen ...
Tweafis
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 647

WinXP + fbsd
Delphi 5 Prof
BeitragVerfasst: Mi 04.06.03 16:40 
patrick dee hat folgendes geschrieben:
habe dir den code wie es geht geschickt

ciao

patrick


Warum postest du ihn nicht hier? Vielleicht hat ja jemand das gleiche Problem.

Fis

_________________
.: Es wird der Tag kommen, an dem wir es nicht mehr ändern können :.