Splash Screen

  • 4 minutes to read

The Splash Screen Manager allows you to create different splash screens. The image below is a splash screen you can create and customize at design time.

The main features include:

  • Non-skin-dependent appearance.
  • Design-time customization.
  • Automatically display and close at the main form’s startup.
  • Use commands to interact with splash forms.

Create and Customize Splash Screen at Design Time

Drop the SplashScreenManager component onto the form. Right click the component in the Visual Studio tray and select Add Splash Screen.

The SplashScreenManager adds a new SplashScreen form to your project.

Double-click the SplashScreen1.cs (SplashScreen1.vb) file to open the design-time editor.

You can change the layout of controls within the Splash Screen, remove or add custom controls, change default labels and images, and more.

NOTE

If you need to extend SplashScreen1.cs/.vb files with custom classes, ensure that the class encapsulating your Splash Screen is defined before your custom classes declaration.

Show and Close Splash Screen Automatically on Main Form Startup

To display the created Splash Screen on your main form’s startup, ensure the SplashScreenManager’s Active Splash Form is set to your splash screen. Open the SplashScreenManager’s smart tag and check the Active Splash Form setting.

Alternatively, you can check the SplashScreenManager.ActiveSplashFormTypeInfo setting in the Property Grid.

The Splash Screen Manager will automatically display the active Splash Screen on your main form’s startup and close it when your main form has been completely initialized and displayed.

Splash Screen Settings

In automatic mode, you can access and customize settings of splash screens from the properties provided by the SplashScreenManager component.

DPI Settings

In v20.2+, Splash Screens are automatically scaled according to the current DPI settings (see Project Settings) when shown on application startup.

In previous versions, if you use a DevExpress form as the main application form, the DPI settings are applied automatically. However, if you show a Splash Screen before the main form, these settings are not applied automatically. To take into account the DPI settings, call the WindowsFormsSettings.LoadApplicationSettings method before the Splash Screen is displayed (for example, in the Splash Screen’s constructor).

using DevExpress.XtraEditors;
using DevExpress.XtraSplashScreen;

public partial class SplashScreen1 : SplashScreen {

    public SplashScreen1() {
        WindowsFormsSettings.LoadApplicationSettings();
        InitializeComponent();
        this.labelCopyright.Text = "Copyright © 1998-" + DateTime.Now.Year.ToString();
    }
}

Show and Close Splash Screen in Code

Ensure you have created a Splash Screen at design time. You can do this with one of the following methods:

TIP

If your form contains a Splash Screen Manager component, ensure its “Active Splash Form” setting equals ‘(None)’.

To display and close an existing Splash Screen, use the static SplashScreenManager.ShowForm and SplashScreenManager.CloseForm methods.

DevExpress.XtraSplashScreen.SplashScreenManager.ShowForm(typeof(SplashScreen1));
//...
DevExpress.XtraSplashScreen.SplashScreenManager.CloseForm();

Splash Screen Settings

The SplashScreenManager.ShowForm method overloads allow you to specify the form’s location and delay, enable fade-in and fade-out effects, and more.

NOTE

Fade-in and fade-out effects are disabled if the Remote Connection Optimization mode is on. See this property for more details: WindowsFormsSettings.OptimizeRemoteConnectionPerformance.

To display the Splash Screen above all other forms, enable the SplashScreen.TopMost property.

TIP

See the following topic for information on how to execute code when your application starts: How to: Perform Actions On Application Startup.

Update Splash Screen Dynamically

Splash screens are displayed in a separate thread. You can use the SplashScreenManager.SendCommand method to interact with the active Splash Screen (for instance, update its contents). To process commands sent by this method, override the SplashScreen.ProcessCommand method.

See Also