windowsforms-10823-controls-and-libraries-forms-and-user-controls-splash-screen-manager-splash-screen.md
The Splash Screen Manager allows you to create different splash screens. This topic describes how to create, customize, and display the DevExpress Splash Screen Form.
Features include:
Drop the SplashScreenManager component onto the form.
Click the SplashScreenManager component to open its smart tag menu. Select Add Splash Screen.
SplashScreenManager automatically adds a new SplashScreen form to your WinForms project and assigns the Splash Screen Form to the SplashScreenManager.ActiveSplashFormTypeInfo property.
Double-click the SplashScreen1.cs (SplashScreen1.vb) file to open the design-time editor.
Rearrange controls on the Splash Screen Form, remove or add controls, and change labels and images to suit your design preferences. The following screenshot shows how to change the default image:
Note
To extend SplashScreen1.cs/SplashScreen1.vb files with custom classes, define a class that encapsulates your Splash Screen before declaring custom classes.
Open the SplashScreenManager’s smart tag menu and ensure that the Active Splash Form setting is set to your Splash Screen Form (in the Properties window, use the SplashScreenManager.ActiveSplashFormTypeInfo property).
The Splash Screen Manager automatically displays the active Splash Screen Form on your main form’s startup and closes the Splash Screen Form after the main form is initialized and displayed.
Note
If your form contains a Splash Screen Manager component, open its smart tag menu and ensure that the Active Splash Form setting is set to ‘(None)’.
Use SplashScreenManager.ShowForm and SplashScreenManager.CloseForm static methods to display and close a Splash Screen Form (the Splash Screen Form must exist in your project):
DevExpress.XtraSplashScreen.SplashScreenManager.ShowForm(typeof(SplashScreen1));
//Perform 'time-intensive' operations.
DevExpress.XtraSplashScreen.SplashScreenManager.CloseForm();
SplashScreenManager.ShowForm(GetType(SplashScreen1))
'Perform 'time-intensive' operations.
SplashScreenManager.CloseForm()
The SplashScreenManager.ShowForm overloaded methods allow you to specify the Splash Screen Form’s location, specify the delay to display the form, enable fade-in and fade-out effects, and more.
To display the Splash Screen Form above other forms, enable the SplashScreen.TopMost option.
Fade-in and fade-out effects are disabled if Remote Connection Optimization mode is enabled.
Tip
Use our Template Gallery: Splash Screen to quickly add a Splash Screen Form to your WinForms project.
In automatic mode (when the Main Form displays the Splash Screen Form on startup), use properties of the SplashScreenManager component to customize splash screen settings:
In v20.2+, Splash Screen Forms are automatically scaled according to DPI settings (when displayed on application startup).
In versions prior to v20.2
In versions prior to v20.2, if you use a DevExpress form as the main application form, DPI settings are applied automatically. However, if you show a Splash Screen Form before the main form, these settings are not applied automatically.
To take DPI settings into account, call the WindowsFormsSettings.LoadApplicationSettings method before the Splash Screen Form is displayed (for example, in the Splash Screen Form’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();
}
}
Imports DevExpress.XtraEditors
Imports DevExpress.XtraSplashScreen
Partial Public Class SplashScreen1
Inherits SplashScreen
Public Sub New()
WindowsFormsSettings.LoadApplicationSettings()
InitializeComponent()
Me.labelCopyright.Text = "Copyright © 1998-" & DateTime.Now.Year.ToString()
End Sub
End Class
Splash Screen Forms are displayed in a separate thread.
Use the SplashScreenManager.SendCommand method to interact with the active Splash Screen Form (for example, update form content).
Override the SplashScreen.ProcessCommand method to process commands sent by the SendCommand method.
See Also
How to: Perform Actions On Application Startup
Splash Screen Manager Serialization Specifics
How to: Dynamically Update Custom Controls Added to Splash Forms
How to: Dynamically Update Wait Form's Caption or Description