The SplashFormShellApplication class extends the FormShellApplication class to show a simple splash screen during the application startup. The class allows an image or an own Form to be used as splash screen.

Listing 1 shows an extract of the Test Suite ShellApplication class. Instead of using the Run method it uses SplashRun and passes an image from the Resources to this method. This image is shown during application startup.

private static void RunInDebugMode()
    new ShellApplication().SplashRun(Resources.Splashscreen);

Listing 1

Tip: Use a 24bit PNG image with transparent colors for the best quality. But do not use the alpha channel capability of the PNG file because it is not supported by Windows Forms.

If the project was created with the Smart Client Software Factory the class SmartClientApplication has to be modified. This class needs to extend from the SplashFormShellApplication like it is shown in Figure 1.

Figure 1

If the WPF support was activated during the project creation with the Smart Client Software Factory the class hierarchy is going to look slightly different. In this case use the SplashWPFFormShellApplication instead of the SplashFormShellApplication class.

Last edited Oct 8, 2007 at 12:14 PM by jbe2277, version 5


No comments yet.