Use a Custom Class to Show a Splash Form (WinForms)
- 2 minutes to read
This topic demonstrates how to create a custom splash form and use a custom class to show this form.
Create a new Windows Form in your solution’s WinForms Application project, name the form SplashScreenForm, and design it to meet your requirements.

Add a new class to your WinForms Application Project and implement the ISplash interface.
- Override the ISplash.Start method. Create a SplashScreenForm instance and call the form’s Show method.
- In the ISplash.Stop method’s override, hide and close the SplashScreenForm.
- The ISplash.IsStarted property indicates whether the SplashScreenForm is shown.
- Override ISplash.SetDisplayText. You can call this method to change the SplashScreenForm‘s text.
The code below demonstrates the MySplash class that implements the ISplash interface.
using DevExpress.ExpressApp.Win; //... public class MySplash : ISplash { static private SplashScreenForm form; private static bool isStarted = false; public void Start() { isStarted = true; form = new SplashScreenForm(); form.Show(); System.Windows.Forms.Application.DoEvents(); } public void Stop() { if(form != null) { form.Hide(); form.Close(); form = null; } isStarted = false; } public void SetDisplayText(string displayText) { } public bool IsStarted { get { return isStarted; } } }Access the WinApplication.cs file. Set the SplashScreen property to a new MySplash class instance.
public MySolutionWindowsFormsApplication() { //... SplashScreen = new MySplash(); // ... }You can display loading progress information. To do this, implement the ISupportUpdateSplash interface in the MySplash class and add the UpdateInfo method to the SplashScreenForm class.
public class MySplash : ISplash, ISupportUpdateSplash { // ... public void UpdateSplash(string caption, string description, params object[] additionalParams) { form.UpdateInfo(description); } } // ... public partial class SplashScreenForm : Form { // ... internal void UpdateInfo(string info) { label2.Text = info; } }Start the application to see the result.
