Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Hiding or minimizing a dos window
Replies: 1   Last Post: Feb 7, 2013 3:54 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Paul Mennen

Posts: 281
Registered: 12/7/04
Hiding or minimizing a dos window
Posted: Feb 5, 2013 9:27 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I'm redirecting the output of a dos program (under Win7x64) to a text file with:

dos('DosProgram parameters > output.txt &');

This works well except for the fact that I want to hide or minimize the dos window.
I've read that this can be done by using some combination of parameters with the start command and/or cmd.exe, but if so it must require some magical combination that I haven't yet discovered. I've tried hundreds of dos(' ') commands but none of them has done the right thing. Sometimes two dos windows are created and only one of them is minimized, and sometimes the redirection doesn't work. So I've pretty much given up hope on that approach unless someone knows exactly how it is done.

I have downloaded a program called WindowAPI which can minimize a window given its HWND handle. I've found that this works for a matlab figure since this same program can be used to find the HWND handle of a matlab figure. It probably would work on a console window as well if I could pass in the HWND handle of the console window, but unfortunately I don't know how to find this handle. Does anyone know how to do this?

Thanks
~Paul



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.