Coming Attractions - Splash Screen With Your Windows Clients

by Khalid Abuhakmeh 26. August 2008 13:35

 

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.

Currently rated 4.0 by 1 people

  • Currently 4/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

Code | General

Comments

Add comment


 

  Country flag

biuquote
  • Comment
  • Preview
Loading



Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen

A Little Narcissism

I am a .NET developer mainly focused on Web development and enterprise applications. I strive to keep my skills at their best and always looking to absorb that much more knowledge. I am learning new things like Windows Workflow Foundation, LINQ, Ruby on Rails, WPF, ASP.NET MVC, and anything else thrown at me; I say bring it on!

RecentComments

Comment RSS