Code covered by the BSD License  

Highlights from
SplashScreen

4.5

4.5 | 5 ratings Rate this file 38 Downloads (last 30 days) File Size: 145.79 KB File ID: #30508
image thumbnail

SplashScreen

by Ben Tordoff

 

23 Feb 2011 (Updated 08 Mar 2011)

Show a splash-screen during MATLAB application start-up.

| Watch this File

File Information
Description

This class provides a splash-screen that you can show as your MATLAB application starts:

 * Border-less window
 * Ability to add text overlays
 * Optional progress bar with configurable location

This is mainly useful when deploying applications using the MATLAB compiler and where your application takes a while to initialize.

Requires MATLAB R2010a or above.

MATLAB release MATLAB 7.10 (2010a)
Tags for This File  
Everyone's Tags
gui
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (8)
03 Mar 2011 Dani

Really, really nice - I wish I had it earlier.

Two questions:

1. Why can I not load animated GIFs? This would allow for even more dynamic splash screens.

2. It would be nice if one could control (deactivate) the text shadow, i.e. lines 100-110.

08 Mar 2011 Ben Tordoff

Hi Dani, an update allowing the text shadows to be turned off is on its way. I don't think the Java tools I'm using allow animated GIFs to be viewed, so I don't think that can be supported in any easy way.

Cheers. Ben

09 Mar 2011 Christophe Tilman

Very nice.
Only one remark about figure position.
On my computer, root 'MonitorPositions' return [left,bottom,right,up] for each monitor instead of [left,bottom, width, height] as described in the matlab documentation.

so, I had to replace line 247 & 248 by those:
x0 = pos(1,1) + (diff(pos(1,[1 3]))-obj.Icon.getIconWidth())/2
y0 = pos(1,2) + (diff(pos(1,[2 4]))-obj.Icon.getIconHeight())/2

Note that this is not an issue if you use only one monitor or if your primary monitor is on the left of the secondary.

09 Mar 2011 Christophe Tilman  
09 Jun 2011 Julián Francisco  
04 Oct 2011 Sim

Nice addition, thank you!

I have a problem in my standalone application: the application hangs when executing the 'delete(s)' command (the splash screen disappears before crashing). Do you have an idea why?

My workaround is to hide the splash screen instead:

set(s,'Visible','off')

26 Nov 2011 Andre Asfar

I have an error:

"Syntax error. You must supply both a window title and imagename"

What should I do?

28 Nov 2011 Ben Tordoff

Hi Andre, you must call this with a name for the window (i.e. a title) and the name of the image file you want it to show. For example: "s = SplashScreen('My App','myAppImage.png')". Type "help SplashScreen" for more information. If that still doesn't help you, let me know.

Ben

Please login to add a comment or rating.
Updates
08 Mar 2011

* Allow text shadows to be turned off
* Improve help for adding text

Tag Activity for this File
Tag Applied By Date/Time
gui Ben Tordoff 25 Feb 2011 11:03:30

Contact us at files@mathworks.com