Autor Beitrag
Boldar
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1555
Erhaltene Danke: 70

Win7 Enterprise 64bit, Win XP SP2
Turbo Delphi
BeitragVerfasst: Sa 27.12.08 19:39 
mmh stimmt nun auch wieder...
Boldar
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1555
Erhaltene Danke: 70

Win7 Enterprise 64bit, Win XP SP2
Turbo Delphi
BeitragVerfasst: Sa 27.12.08 19:40 
Aber ich merke gerade: ich habe ne Konsolenanwendung und deshalp gibt es application.handle nicht...
edith: aso das kann ich ja streichen, is ja nur ne showmessage...
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19314
Erhaltene Danke: 1747

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Sa 27.12.08 19:42 
Meistens geht aber einfach 0, weil der Befehl sich eben auf kein Fenster deiner Anwendung beziehen soll. Der Grund weshalb man das angibt ist ja z.B. bei einer MessageBox, damit der Besitzer der Box auf das angegebene Fenster gesetzt wird.
Gibst du 0 an, dann gibt es eben keinen Besitzer.
Boldar
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1555
Erhaltene Danke: 70

Win7 Enterprise 64bit, Win XP SP2
Turbo Delphi
BeitragVerfasst: Sa 27.12.08 19:50 
Also, es geht trotzdem nicht. Obwohl die PID > 0 ist, bekomme ich die Fehlermeldung, das Handle sei ungültig.
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19314
Erhaltene Danke: 1747

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Sa 27.12.08 20:03 
user profile iconBoldar hat folgendes geschrieben Zum zitierten Posting springen:
Also, es geht trotzdem nicht.
Das kann ich mit Luckies Code nicht reproduzieren. :nixweiss:
Bei mir wird der WMP geschlossen, egal ob er gerade minimiert, in der Taskleiste als Miniplayer oder sichtbar ist.
Boldar
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1555
Erhaltene Danke: 70

Win7 Enterprise 64bit, Win XP SP2
Turbo Delphi
BeitragVerfasst: Sa 27.12.08 20:03 
Und noch nichtmal das da geht: www.swissdelphicente.../showcode.php?id=266
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19314
Erhaltene Danke: 1747

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Sa 27.12.08 20:07 
Auch das funktioniert bei mir. :nixweiss:
Hast du vielleicht einen Tippfehler im Namen der Exe?

Welche Version vom WMP nutzt du? Welche Windowsversion? Wie sieht dein Code beim Aufrufen aus?

Angehängt habe ich user profile iconLuckies Code als Exe, mit nur einem Button, der den nächstbesten laufenden WMP versucht zu killen.
Einloggen, um Attachments anzusehen!
Boldar
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1555
Erhaltene Danke: 70

Win7 Enterprise 64bit, Win XP SP2
Turbo Delphi
BeitragVerfasst: Sa 27.12.08 20:09 
mmh das geht wunderbar... aber was machst du anders? Welchen Dateinamen nimmst du denn?

btw: ouch... projekt 105... Wie wohl dein Projektverzeichniss aussieht... bestimmt schon über 20GB
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19314
Erhaltene Danke: 1747

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Sa 27.12.08 20:11 
Das ist user profile iconLuckies Code mit folgender Zeile:
ausblenden Delphi-Quelltext
1:
  KillProcess(GetProcessID('wmplayer.exe'));					
Die Auflistung und so hab ich einfach rausgenommen.
Boldar
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1555
Erhaltene Danke: 70

Win7 Enterprise 64bit, Win XP SP2
Turbo Delphi
BeitragVerfasst: Sa 27.12.08 20:16 
mmh naja jetzt kenn ich den Fehler... ich hab den kompletten Dateipfad angegeben... ein
extractfilename und es läuft... :autsch:

Moderiert von user profile iconNarses: Smilietis kuriert
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19314
Erhaltene Danke: 1747

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Sa 27.12.08 20:25 
Wozu das? Der WMP heißt doch immer gleich. :gruebel:

Btw.:
user profile iconBoldar hat folgendes geschrieben Zum zitierten Posting springen:
btw: ouch... projekt 105... Wie wohl dein Projektverzeichniss aussieht... bestimmt schon über 20GB
Im Standardverzeichnis für automatisches Speichern bei F9 sinds 1146 Dateien und 67 Ordner (in die Ordner hab ich mal etwas einsortiert, meistens mit der entsprechenden Topic-ID aus dem Forum dabei :D), insgesamt sinds 3750 Dateien in 347 MiB. :D
Und meine Partition rein mit Quelltexten und Projekten (eigene und heruntergeladene) enthält genau 40,9 GiB in 398.982 Dateien und 29.074 Ordnern. :D
Boldar
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1555
Erhaltene Danke: 70

Win7 Enterprise 64bit, Win XP SP2
Turbo Delphi
BeitragVerfasst: Sa 27.12.08 20:32 
OMG