Autor Beitrag
Michael15
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 76

Win XP Professional
Delphi 2, 3, 7, 8
BeitragVerfasst: Fr 18.03.05 12:29 
Hallo Leute,
Ich möchte eine Mp3 abspielen lassen, wenn ich auf einen Tbutton drücke.
Wie mache ich das???
Kann mir jemand helfen???


Moderiert von user profile iconChristian S.: Topic aus Sonstiges verschoben am Fr 18.03.2005 um 12:39
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: Fr 18.03.05 14:05 
Wenn dein Programm das abspielen übernehmen soll, hilft bestimmt die TMediaplayer-Komponente weiter. Wenn du das abspielen dem jeweiligen Standarprogramm (Winamp, Mediaplayer etc.) überlassen willst, hilft das Stichwort Suche in: Delphi-Forum, Delphi-Library SHELLEXECUTE

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

Win XP Prof.
D2 Schüleredition, D7
BeitragVerfasst: Fr 10.06.05 14:28 
Hi Michael!!!

Wie wäre es mit:


ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
 
procedure button1_klick; 
begin 
form1.Mediaplayer1.filename := 'C:\deine Datei'; 
form1.Mediaplayer1.open; 
form1.mediaplayer1.play; 
end;


Moderiert von user profile iconGausi: Doppel-Posting entfernt.

_________________
Ich bin nur Schüler.
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Fr 10.06.05 14:28 
da könnte ich dir mein tmediaplayer-tutorial wärmstens ans herz legen: Suche in: Delphi-Forum, Delphi-Library TMEDIAPLAYER TUTORIAL

_________________
es gibt leute, die sind genetisch nicht zum programmieren geschaffen.
in der regel haben diese leute die regel...
-delphin-
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 200



BeitragVerfasst: Sa 11.06.05 22:56 
ganz einfach:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure TForm1.Button1Click(Sender: TObject);
begin
  SndPlaySound( 'MEINESOUNDDATEI.MP3', SND_ASYNC );
end;


Dann noch in der Uses-Section
ausblenden Delphi-Quelltext
1:
mmSystem;					

einfügen und dann hastes.. halt noch die MP3-Datei in den Ordner der EXE
LH_Freak
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 385

Win XP
D7 PE, D2k5 Trial
BeitragVerfasst: Sa 11.06.05 23:42 
ich dachte immer das geht nur mit WAVE-Dateien (also das sndPlaySound(...))