Autor Beitrag
V!P3R
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 151



BeitragVerfasst: So 01.06.08 17:23 
Hi,

Ich habe ein programm mit einem TMEdiaPlayer.
Man kann problemlos eistellen (in FileName) wo man die musik hernimmt.

aber wenn ich im Laufe des programmes den pfad ändern will. wie geht das?

wenn man
ausblenden Delphi-Quelltext
1:
MediaPlayer1.FileName:='Bespiel\Beispiel.wav'					

macht, dann meldet delphi einen fehler.


MfG

PS: hab die frage noch mal geändert. trotzdem danke an jakobwenzel


Moderiert von user profile iconNarses: Topic aus Delphi Language (Object-Pascal) / CLX verschoben am So 01.06.2008 um 18:16


Zuletzt bearbeitet von V!P3R am So 01.06.08 17:32, insgesamt 2-mal bearbeitet
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: So 01.06.08 17:30 
Application.ExeName oder ParamStr(0) liefert dir den Dateinamen deiner Exe, mit ExtractFilePath bekommst du den Ordner.

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
nagel
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 708

Win7, Ubuntu 10.10

BeitragVerfasst: So 01.06.08 17:42 
user profile iconV!P3R hat folgendes geschrieben:
... dann meldet delphi einen fehler.


Welchen?
V!P3R Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 151



BeitragVerfasst: So 01.06.08 18:00 
lol, jetzt meldet er keinen fehler.

aber funktionieren tut es trozdem nicht, ich hab im Obejekttinspektor: FileName[...\1.wav]

dann hab ich in OnCreate von Form1 geschrieben:
ausblenden Delphi-Quelltext
1:
MediaPlayer1.FileName:='...\...\2.wav';					


aber wenn ich im programm dann auf play drücke wird 1.wav abgespielt!!!


MfG