The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

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: 311
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?


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

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.