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

Win XP Prof.
D2 Schüleredition, D7
BeitragVerfasst: Do 24.03.05 18:48 
Hey Leute !!!

Weíß einer von euch wie man durch z.B. Buttonklick ein anderes Programm, also eine andere .exe-Datei öffnen kann ???

Marco15


Moderiert von user profile iconTino: Topic aus Sonstiges verschoben am So 27.03.2005 um 22:12
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: Do 24.03.05 18:50 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
uses ShellAPI;
...

ShellExecute(0, 'open', PChar(dateiname), '', '', SW_SHOW);

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

Win XP Prof.
D2 Schüleredition, D7
BeitragVerfasst: Do 24.03.05 18:55 
Jo klappt :shock: !

Aber wie funktioniert das bei mp3's oder anderen Media-Dateien, die dann aber auch abgespielt werden sollen ?

Marco15
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: Do 24.03.05 18:57 
genau gleich, dann öffnet sich halt das zugeordnete programm gleich mit.
wenn du das aber innerhalb deines programms abspielen lassen willst, machst du das am einfachsten mit der TMediaPlayer komponente.

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

Win XP Prof.
D2 Schüleredition, D7
BeitragVerfasst: Do 24.03.05 19:02 
Und wie geht das da mit ???

Sorry, aber ich bin ein Anfänger was Delphi angeht ???

Marco15
Marco15 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 98

Win XP Prof.
D2 Schüleredition, D7
BeitragVerfasst: Do 24.03.05 19:03 
Er macht es aber er öffnet halt Winamp mit ???

Wie spielt er das denn im Programm ab ???
Marco15
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: Do 24.03.05 19:04 
reicht es dir nicht, wenn sich einfach dein mp3-player programm startet ? einen tmediaplayer zu implementieren, sodass man z.b. mehrere stücke hintereinander abspielen kann ist relativ aufwendig.
nur einfach, solange man es bei einem file belässt...

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

Win XP Prof.
D2 Schüleredition, D7
BeitragVerfasst: Do 24.03.05 19:05 
Mehr als eine file brauch sowieso nicht, das reicht völlig!

Marco15
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: Do 24.03.05 19:07 
davidmoseley.members...t/tutorial/bcbmp.htm <- falls du etwas englisch kannst

edit: das hier müsste für deine zwecke reichen:
tmediaplayer auf die form ziehen
im code
ausblenden Delphi-Quelltext
1:
2:
3:
MediaPlayer1.FileName:=mp3Name;
MediaPlayer1.Open;
MediaPlayer1.play;

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

Win XP Prof.
D2 Schüleredition, D7
BeitragVerfasst: Do 24.03.05 19:18 
Hey hat geklappt !!!
Vielen Dank !!!

Marco15 :)
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: Do 24.03.05 19:21 
um eventuellen abstürzen vorzubeugen, falls die mp3 datei mal nicht am richtigen ort ist kannst du auch dieses hier machen:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
uses sysutils;
...

if fileexists(mp3name) then begin
  MediaPlayer1.FileName:=mp3Name;
  MediaPlayer1.Open;
  MediaPlayer1.play;
end;

_________________
es gibt leute, die sind genetisch nicht zum programmieren geschaffen.
in der regel haben diese leute die regel...
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: So 27.03.05 21:12 
user profile iconMarco15 hat folgendes geschrieben:
Er macht es aber er öffnet halt Winamp mit ???

Wie spielt er das denn im Programm ab ???
Marco15

Das wäre eine neue Frage gewesen. Bitte in Zukunft ein neues Topic bei einer neuen Fragen erstellen.

Gruß
Tino