Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need To Close An Application
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00691241
Message ID:
00691567
Views:
23
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform