Autor Beitrag
Maxman
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 28



BeitragVerfasst: Do 04.07.02 16:02 
Hallo Leute! :cry:

Ich möchte gerne mit einer Delphianwendung irgend ein anderes Programm beenden. Ich hab schon mal was mit SendMessage(...) gehört, kann dadurch meinen Wünsch nicht erfüllen. Kann mir bitte jemand helfen?!

Danke im voraus!
Maxman
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Do 04.07.02 16:52 
Auf jeden Fall die falsche Sparte :!:
toms
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1099
Erhaltene Danke: 2



BeitragVerfasst: Do 04.07.02 18:35 
Hi,

Es gibt verschiedene Möglichkeiten, eine Anwendung zu beenden.
Je nachdem ist die eine oder andere vorteilhafter.
Es gibt eine sanfte und eine etwas unsanftere Methode.

1) Sanfte Methode:

Handle des Fensters finden. Dann SendMessageTimeout mit WM_CLOSE
senden mit den Flags SMTO_ABORTIFHUNG or SMTO_NORMAL.

2) ProzessID des Fensters (App) herausfinden und dann mit TerminateProcess beeden.

Siehe auch:
www.swissdelphicente.../showcode.php?id=266

tom
Maxman Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 28



BeitragVerfasst: Fr 05.07.02 12:54 
Titel: Danke!
Hallo und vielen Dank!

Ich habe die Procedure in meine Applikation eingebaut und es hat geklappt! Ich verstehe sie zwar noch nicht ganz, aber das ist jetzt zumindest noch nicht so wichtig!

Nochmals vielen Dank!
Maxman