INTRODUCTION
Have you ever wondered what a software developer does to create a splash screen for a program? I would like to discuss the method I use to create one for my desktop application development projects.
I use an unusual design for my splash screen. It consists of an ellipse enclosed in a silver colored rectangle. Inside the ellipse are some shaded, green vertical bars that resemble columns interspersed with a black background. The text information pertaining to the program is then centered in the middle and on top of the green and black color patterns.
THE C# CODE THAT CREATES THE SPLASH SCREEN PICTURE
The “SplashForm” Windows form contains the C# code that creates an “image-on-the-fly of the splash picture” that is sent to the screen. Please click here to see the web page I made for this. Just click on the “Agree” button to view the full C# programming code.
The platform I use for this is Microsoft Visual Studio Express 2012 for Windows Desktop. In the Program.cs file of the project, I use this code in the main module:
- static void Main()
- {
- Application.EnableVisualStyles();
- Application.SetCompatibleTextRenderingDefault(false);
- // run splash screen.
- Application.Run(new SplashForm());
- // run main menu.
- Application.Run(new MainForm());
- }
ASSEMBLING THE WINDOWS FORM SPLASH SCREEN
Now that the splash screen image is done, it is time to finish putting the splash screen together. Here I present the C# code from the “SplashForm” Windows form that sets the splash screen timer for 5 seconds. It is then closed and the main program screen with its menu bar will appear. Also, the coding under the form's “Activated event” used to create the “image-on-the-fly of the splash picture” can now be suppressed or removed at this point. This is no longer needed since we now have the splash screen image that will be bound to the “SplashForm” Windows form.
- // this code creates a 5 second time interval, which
- // will keep the splash screen visible for that time
- // interval before it is closed and the main program
- // screen appears with its menu bar.
- public partial class SplashForm : Form
- {
- System.Windows.Forms.Timer t = new System.Windows.Forms.Timer();
- public SplashForm()
- {
- InitializeComponent();
- SetAndStartTimer();
- }
- private void SetAndStartTimer()
- {
- t.Interval = 5000;
- t.Tick += new EventHandler(t_Tick);
- t.Start();
- }
- void t_Tick(object sender, EventArgs e)
- {
- this.Close();
- }
- .
- .
- .
- .
- .
- // the form's activated event appears after this
- // set up stuff in the actual code to create the
- // “image on the fly of the splash picture” to be
- // used for creating the splash screen (it will be
- // captured by the Snagit screen capture utility).
- }
- BackgroundImage: Choose the splash screen image previously created with the Snagit Windows Screen Capture Utility.
- FormBorderStyle: Choose the option “None”.
- Size: Key in the width in pixels then a comma followed by the height in pixels of the splash screen image.
- StartPosition: Choose the option “CenterScreen”.
Lastly, from the menu bar in Microsoft Visual Studio Express 2012 for Windows Desktop, click the “Build” option and then select from its pop-up menu the “Rebuild Solution” item. This will check the C# project for any coding errors and generate a new executable so the application can be run with the newest updates.
What I have presented here is a 2 step process for creating an introductory splash screen from scratch for Microsoft Visual Studio Express 2012 for Windows Desktop projects. Although the graphic image design can vary from what I chose for myself, the chronological steps remain the same. I'm not saying this is the best way to proceed, but it seemed to work fine for my purposes. There is an almost endless way to use one's developer skills to arrive at the same programmed solution.

Sándor ZoltániPosted Dec 15, 2014, 2:36 PM
The problem with this is that the rest of the program is not running meanwhile. The rest could at least initialize on a different thread. Actually thats the purpose of a splashscreen.
Douglas MillerPosted May 7, 2014, 11:29 PM
glad you like it...
Mukesh Kumar TiwariPosted May 4, 2014, 5:41 AM
good...