Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to close a DOS window?

Status
Not open for further replies.

vmikeydet

Programmer
Oct 22, 2002
4
US
I've got a Visual FoxPro application that needs to open a DOS command window, run a FORTRAN program in the window, and provide the user the ability to cancel the FORTRAN program and close the DOS window. Currently, I'm using a ShellExecute call to run the FORTRAN program in a DOS window. The program can be canceled by manually selecting the DOS window and typing ctrl-c. Can I cancel the program and close the DOS window programatically with API calls? I'll be doing this from Visual FoxPro v7.

Thanks for any help.
 
You can do it using the CreateProcess and TerminateProcess API calls in VB.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top