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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Controlling DOS Window

Status
Not open for further replies.

gforrest

Programmer
Apr 26, 2000
39
0
0
CA
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;How does one control a DOS Window after it has been opened via Delphi?<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I want to open a Window and start a batch file in one step without the user having to start the batch file.&nbsp;&nbsp;I'm using a utility called TExecute to start cmd.exe in Windows NT.&nbsp;&nbsp;As soon as the DOS Window is opened focus passes back to my Delphi application.<br><br>&nbsp;&nbsp;&nbsp;Any suggestions or ideas would be greatly appreciated.<br><br>&nbsp;&nbsp;&nbsp;Thanks.
 
You can open a DOS window by AllocConsole, look into the Win32.hlp help file for more info (especially its group of functions)...<br>If you're trying to open an external Batch file, look up ShellExecuteEx<br>and have a look at the SW_* values, there should be a value to give the new DOS box focus
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top