Autor Beitrag
Nippey
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 36



BeitragVerfasst: Do 01.06.06 14:07 
Hi
Ich bin ein ziemlicher Anfänger in Delphi.Wir fangen grade in der Schule damit an und haben eine Hausaufgabe aufbekommen und zwar:

wir sollen eine oberfläche erstellen mit nem Button udn wenn wir da drauf klicken soll sich ein Programm das wir auf dem PC haben öffnen,z.B. Winamp.exe.

ich hab kein plan was ich da in den Button rein schreiben muss damit dies passiert...Bitte helft mir


Zuletzt bearbeitet von Nippey am Do 01.06.06 14:22, insgesamt 1-mal bearbeitet
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: Do 01.06.06 14:31 
Hallo und :welcome: in der Entwickler-Ecke!

Diese Frage kommt sehr oft. Dazu benötigt man Shellexecute aus der Unit ShellAPi, die man in die Uses-Liste hinzufügen muss. MsPaint wird dann z.B. so gestartet:
ausblenden Delphi-Quelltext
1:
ShellExecute(Handle, 'open' ,'mspaint.exe', Nil, '', sw_ShowNormal)					

_________________
We are, we were and will not be.
Schüler
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 183



BeitragVerfasst: Fr 15.09.06 20:19 
Hallo ich habe dazu auch noch ne Frage könnte ich über diesen Weg auch ein Lied öffnen??
Marco D.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Fr 15.09.06 20:25 
Natürlich, einfach den Pfad zum Lied statt mspaint.exe angeben.

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
Schüler
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 183



BeitragVerfasst: Fr 15.09.06 20:38 
Vielen Dank ich wollte aber gerne das, das Lied im Hintergrund geöfnnet wird wenn ja wie???


Zuletzt bearbeitet von Schüler am Fr 15.09.06 20:49, insgesamt 1-mal bearbeitet
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: Fr 15.09.06 20:44 
user profile iconNippey hat folgendes geschrieben:
Hi
Ich bin ein ziemlicher Anfänger in Delphi.Wir fangen grade in der Schule damit an und haben eine Hausaufgabe aufbekommen und zwar:

wir sollen eine oberfläche erstellen mit nem Button udn wenn wir da drauf klicken soll sich ein Programm das wir auf dem PC haben öffnen,z.B. Winamp.exe.

ich hab kein plan was ich da in den Button rein schreiben muss damit dies passiert...Bitte helft mir


Irgendwie kommt Mir die Sache Suspekt vor.
Ich könnte Mir noch vorstellen das Mich soetwas selber Interessiert, aber als Hausaufgabe !!!!
Schüler
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 183



BeitragVerfasst: Fr 15.09.06 20:51 
user profile iconSchüler hat folgendes geschrieben:
Hallo ich habe dazu auch noch ne Frage könnte ich über diesen Weg auch ein Lied öffnen??
geht das hoffentlich
Marco D.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Fr 15.09.06 21:00 
user profile iconSchüler hat folgendes geschrieben:
Vielen Dank ich wollte aber gerne das, das Lied im Hintergrund geöfnnet wird wenn ja wie???

Verstehe nicht, worauf du hinaus willst. Gehts bitte konkreter?

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
Schüler
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 183



BeitragVerfasst: Fr 15.09.06 21:06 
wie kann ich das Programm minimiert öfnen wenn ich es jetzt öfnne springt es mich immer an ich möchte das man das Fenster das geöffnet wirt nicht sieht.
Marco D.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Fr 15.09.06 21:08 
Würde es auch reichen, wenn dein Programm selber dieses Lied abspielt? Es gibt sicher einen WIN-Api-Befehl, um ein Programmfenster verschwinden zu lassen. Meinst du ganz ausblenden oder nur minimieren?

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
Schüler
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 183



BeitragVerfasst: Fr 15.09.06 21:20 
eigentlich nur minimieren.
wulfskin
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1349
Erhaltene Danke: 1

Win XP
D5 Pers (SSL), D2005 Pro, C, C#
BeitragVerfasst: Di 19.09.06 11:43 
user profile iconSchüler hat folgendes geschrieben:
eigentlich nur minimieren.
Letzter Parameter ist dann SW_SHOWMINIMIZE(D). Ein Blick in die Hilfe oder ins MSDN hätte es aber auch getan...

_________________
Manche antworten um ihren Beitragszähler zu erhöhen, andere um zu Helfen.