How can I hide the console window and call the splash screen?

I used the Matlab compiler to create the .exe file. It takes 15 seconds to start the program. I would like to hide the console window and display a custom splash screen. How can i do this?

+4
source share
3 answers

Regarding the creation of a pop-up screen, there are a few ideas about The MathWorks File Exchange that relate only to this:

I have not used any of them personally, but they should at least give you some tips if you want to create your own splash screen features.

+2
source

You can write the program "launcher".

Launcher will

  • Create a screensaver
  • Run matlab exe using CreateProcess () or another method.
  • Wait until matlab exe function opens correctly.
  • Output

A hard bit will determine when the matlab program is running. One method might be to call EnumWindows () and GetWindowText () in a loop, looking for the matlab header, but you could better understand what Matlab does.

You will probably need to verify that the matlab process is not dead if something goes wrong.

0
source

To get rid of the DOS window, use mcc -e instead of mcc -m . See "MATLAB Compiler> Function Reference" in the online documentation provided by doc() . You may not want to do this: the DOS window is the result of the last resort; where there are unhandled exceptions, core dumps, and other diagnostic output. At least make it possible so that you can create a debug build with a DOS window.

In my experience, the startup overhead for a compiled stand-alone Matlab program occurs before control passes to the user M code, so the splash screen must be executed in an external program or connected to the C wrapper that mcc generates. You could use the suggestion of Michael J. Write a launcher. However, you are not looking for matlab.exe or the Matlab desktop window, as it is a standalone application. To determine when the Matlab program started, ask the M-code to write a small temp file as the first thing the program executes, and try starting your startup program.

0
source

All Articles