Skip to main content

SplashScreenManager.SetWaitFormCaption(String) Method

Sets the active WaitForm‘s caption to the specified value.

Namespace: DevExpress.XtraSplashScreen

Assembly: DevExpress.XtraEditors.v24.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

public void SetWaitFormCaption(
    string caption
)

Parameters

Name Type Description
caption String

A string that is the new value for the active WaitForm‘s caption.

Remarks

A WaitForm is displayed by a SplashScreenManager in a separate thread. To safely set the active WaitForm’s caption and description, use the SplashScreenManager.SetWaitFormCaption and SplashScreenManager.SetWaitFormDescription properties.

Example

A Wait Form is displayed by a Splash Screen Manager in a separate thread. To dynamically change labels within the Wait Form, while it is being displayed, use the SplashScreenManager.SetWaitFormCaption and SetWaitFormDescription methods.

View Example

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraSplashScreen;
using System.Threading;

namespace WaitForm_SetDescription {
    public partial class Form1 : Form {
        public Form1() {
            InitializeComponent();
        }

        private void btnShowWaitForm_Click(object sender, EventArgs e) {
            //Open Wait Form
            SplashScreenManager.ShowForm(this, typeof(WaitForm1), true, true, false);

            //The Wait Form is opened in a separate thread. To change its Description, use the SetWaitFormDescription method.
            for (int i = 1; i <= 100; i++) {
                SplashScreenManager.Default.SetWaitFormDescription(i.ToString() + "%");
                Thread.Sleep(25);
            }

            //Close Wait Form
            SplashScreenManager.CloseForm(false);
        }
    }
}

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SetWaitFormCaption(String) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also