Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need To Close An Application
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00691241
Message ID:
00691567
Vues:
24
>WOW! I found the problem!
>
>In the string "Spot Media Tracking System - Kevin Marois"
>
>I had an extra space after the dash. I didn't pick it up because
>the title bar is a non-preportional font and it doesnt stand out
>easily.
>
>Anyhow, the TerminateProcess now works.
>
>Thanks guys!

I would use the SendMessage method instead. It allows the other application to shutdown gracefully. TerminateProcess doesn't and should really be used when (if) SendMessage fails. The general idea would be to send the shutdown message, wait 5-10 seconds (via the Sleep API call), then, if FindWindow still returns a valid hWnd (eg. > 0), then terminate it.
-Paul

RCS Solutions, Inc.
Blog
Twitter
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform