So I just installed the Visual Studio 2008 SP1. There are many new upgrades and bug fixes with SP1, but something caught my eye. There was a new build action given to images called "Splash Screen." This build action will generate boiler plate code to show an image. That's pretty cool! the boiler plate code looks something similar to this.
///
/// Application Entry Point.
///
[System.STAThreadAttribute()]
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public static void Main() {
SplashScreen splashScreen = new SplashScreen("mypaltheking.jpg");
splashScreen.Show(true);
SplashScreen.App app = new SplashScreen.App();
app.InitializeComponent();
app.Run();
}
The steps to getting your splash screen to show up are very simple. Just follow the steps outlined below.
Step 1 - Start a new project
Step 2 - Add the image to your project
Step 3 - Change the build action to SplashScreen
Step 4 - Build and look at your SplashScreen
There you have it, a splash screen for your WPF or Windows Form application. Enjoy the cool new feature. You can also use the SplashScreen class directly by instantiating it and calling the Show method. In the future I might try to inherit from the splash screen class and implement progress bars or informational text.