Terminating all running applications from a VFP program http://www.news2news.com/vfp/?example=243 API calls used: CloseHandle GetActiveWindow GetWindow GetWindowText GetWindowTextLength GetWindowThreadProcessId IsWindow IsWindowVisible OpenProcess PostMessage TerminateProcess The code enumerates not running processes but windows and then obtains process handle for each window found.