Fermer une application externe

Résolu
craftsystem Messages postés 143 Date d'inscription samedi 21 juillet 2007 Statut Membre Dernière intervention 7 mars 2009 - 23 sept. 2007 à 09:17
craftsystem Messages postés 143 Date d'inscription samedi 21 juillet 2007 Statut Membre Dernière intervention 7 mars 2009 - 23 sept. 2007 à 09:42
salut a tous

j'aurai voulus savoir comment fermer une application externe

If FindWindow('TIdaWindow',nil)<>0 Then Application.Terminate;//ferme mon application

j'aurais voulus par la meme occasion fermer "TIdaWindow"

comment faire?

La Force 2 La Mao C Sa Diversité

2 réponses

Cirec Messages postés 3833 Date d'inscription vendredi 23 juillet 2004 Statut Modérateur Dernière intervention 18 septembre 2022 50
23 sept. 2007 à 09:37
Salut,
essaye comme ceci :

Var aHandle : THandle;
Begin
  aHandle := FindWindow('TIdaWindow', Nil );
If aHandle > 0Then  Begin
  SendMessage(aHandle, WM_CLOSE, 0, 0);
  Application.Termimate;
End;
End;

 
@+
Cirec

<hr siz ="" />
3
craftsystem Messages postés 143 Date d'inscription samedi 21 juillet 2007 Statut Membre Dernière intervention 7 mars 2009
23 sept. 2007 à 09:42
Tu déchire tous

grand merci

La Force 2 La Mao C Sa Diversité
0
Rejoignez-nous