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

How can I start a MINIMIZED DOS-box from a 32-bit program?

Status
Not open for further replies.

dgb

Programmer
May 24, 2000
2
US
How can I launch a MINIMIZED DOS box from a 32-bit program?&nbsp;&nbsp;In NT, CreateProcess() can start the CMD.EXE minimized without any problems.&nbsp;&nbsp;However, in Windows 95/98 I can't find a way to launch COMMAND.COM, or any other 16-bit process, MINIMIZED.<br><br>I've tried a lot of permutations of the CreateProcess() parameters and altered .PIF files without success.&nbsp;&nbsp;Does anyone know how to do it?<br><br>Thanks
 
Windows 95/98 just wanted me to concede defeat.&nbsp;&nbsp;I found the solution just after posting the message.&nbsp;&nbsp;In the STARTUPINFO structure used in CreateProcess I was using:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;StartupInfo.wShowWindow = SW_MINIMIZE;<br><br>which worked under NT but had no apparent effect under Windows 95/98.&nbsp;&nbsp;I've changed to:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;StartupInfo.wShowWindow=SW_SHOWMINNOACTIVATE<br><br>which seems to do what I want under all systems.<br><br>Thanks -dgb<br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top