Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Hiding the DOS window in a stand-alone application

363 views
Skip to first unread message

Chris

unread,
Jul 24, 2006, 4:43:13 PM7/24/06
to
Hi,

I've created a stand alone GUI application. When I execute the
application the DOS window appears as well as my GUI. Is there any
way to hide the DOS window? It is not used for any data input or
output and just gets in the way. All I want to see when I run my
application is the GUI.

Thanks for the help!

- Chris

vihang

unread,
Jul 25, 2006, 2:32:45 AM7/25/06
to

Chris

unread,
Jul 25, 2006, 9:02:52 AM7/25/06
to

Thanks for the quick response Vihang. This seems to be what I was
looking for. However, when I attempted to run it I received the error
"This application has failed to start because LIBMATLB.DLL was not
found." I am using Matlab R2006a and did not find this missing file
anywhere on my computer. I downloaded it from mathworks but then
received another error "The procedure entry point
mxGetRegisterInternalFcnsFcn could not be located in libmx.dll." Do
you know if this is a problem with R2006a or have any idea how I
could fix this?

Thanks again,
Chris

Dan Hensley

unread,
Jul 25, 2006, 9:36:02 AM7/25/06
to

I went to www.mathworks.com and did a search for "hide DOS window". Here
is the first link it returned:

http://www.mathworks.com/support/solutions/data/1-18NBZ.html?solution=1-18NBZ

Dan

Mike

unread,
Sep 8, 2006, 10:41:51 AM9/8/06
to

Seem to have the same problem myself in Matlab 7 (R14). Do I have to
install some math library toolbox to get rid of this problem?

Thanks, Mike.

Christopher Engel

unread,
Sep 8, 2006, 1:32:49 PM9/8/06
to
Hey Mike,

I actually figured out what was wrong when I was having this problem.
Along with the DOS utility there was a sample program. Well, I just
wanted to make sure everything would work before running it with my
GUI so I just ran the suppresser utility with the provided sample
application. This is where my problem was. The sample program did
NOT work with my version of Matlab. I removed the sample program,
stuck mine in there and the problem was fixed.

If you're trying to run the DOS suppressor with the sample
application this very well may be the same problem. If this isnt the
fix let me know and I'll look into it further.

Good luck,

Chris

Paul Mennen

unread,
Sep 8, 2006, 8:15:13 PM9/8/06
to
Chris wrote:
> All I want to see when I run my application is the GUI.

Of course that's what you want. It's what most people
want when they build a GUI. A shame that TMW
has never recognized this. Enabling the DOS
window should be a simple option. This question seems
to have been repeated every few months for many years.

At least for the older compiler I use, there is a
linker parameter change that is supposed to remove
the DOS window. Never worked for me however.

The suppress.exe mentioned by the other poster
does work, but using it in general way becomes
difficult or impossible depending on the situation.
(Gets worse with multiple applications in the same directory).

Now I use a a much better solution - a function
called winswhowwin - found at:

<http://www.soundslogical.com/products/mpacks/mpacku_intro.html>

Not free, unfortunately. But for me it was well
worth the $40 investment.

~Paul

vihang

unread,
Sep 9, 2006, 4:36:54 AM9/9/06
to
Paul Mennen wrote:

>
>
> Chris wrote:
>> All I want to see when I run my application is the GUI.
>

Hello Everyone
Well you need to just add this at the end of compopts.bat file, and
then compile using mcc, to hide the DOS window
You can either open the above mentioned file using notepad or the
M-file editor.

set LINKFLAGS=%LINKFLAGS% /SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup

P.S: Search for compopts.bat file in your "C:\" drive
HTH
Vihang

vihang

unread,
Sep 9, 2006, 5:03:20 AM9/9/06
to
> Hello Everyone
> Well you need to just add this at the end of compopts.bat file, and
> then compile using mcc, to hide the DOS window
> You can either open the above mentioned file using notepad or the
> M-file editor.
>
> set LINKFLAGS=%LINKFLAGS% /SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup
>
> P.S: Search for compopts.bat file in your "C:\" drive
> HTH
> Vihang

Hello, well while posting the above message I assumed that the
compiler is VC, so the following completes the above message.
P.N TESTED IN R14 SP2(works fine!!)

Add following line to your options file before you compile:

LCC:

set LINKFLAGS=%LINKFLAGS% -subsystem windows

Microsoft Visual C/C++:



set LINKFLAGS=%LINKFLAGS% /SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup

Borland:

set LINKFLAGS=%LINKFLAGS% -aa

If you do not have this line, the system defaults to building a
console
application.

You may edit your options file by typing the evaluating the following

sequence of MATLAB commands:

cd(prefdir)
edit compopts.bat

The above steps may cause undesirable or application-fatal behavior
if
your application generates any output that would otherwise be
displayed
in the console window.

HTH
Vihang

Mike

unread,
Sep 11, 2006, 5:30:33 AM9/11/06
to
Many thanks Chris and Vihang!

Suppress.exe seems to work very well now. /Mike.

0 new messages