Skip to main content
A newer version of this page is available. .

SplashFormBase.ProcessCommand(Enum, Object) Method

When overridden, the method allows you to process commands received from a SplashScreenManager via the SplashScreenManager.SendCommand method.

Namespace: DevExpress.XtraSplashForm

Assembly: DevExpress.XtraEditors.v18.2.dll

Declaration

public virtual void ProcessCommand(
    Enum cmd,
    object arg
)

Parameters

Name Type Description
cmd Enum

An enumeration value that identifies the received command.

arg Object

The received command’s parameter.

Remarks

See SplashScreenManager.SendCommand to learn more.

Example

In this example a custom Progress Bar Control is added to a Splash Screen. The example shows how to update this Progress Bar Control dynamically by sending commands from a Splash Screen Manager.Splash Screens are displayed by a Splash Screen Manager in a separate thread. Interaction with Splash Screens can be performed via the command mechanism. You send a command via the SplashScreenManager.SendCommand method and process this command by overriding the SplashScreen.ProcessCommand method. In the example, custom commands are sent to the Splash Screen to advance the progress of the Splash Screen's Progress Bar Control.

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

namespace SplashScreen_ProcessCommand {
    public partial class SplashScreen1 : SplashScreen {
        public SplashScreen1() {
            InitializeComponent();
        }

        #region Overrides

        public override void ProcessCommand(Enum cmd, object arg) {
            base.ProcessCommand(cmd, arg);
            SplashScreenCommand command = (SplashScreenCommand)cmd;
            if (command == SplashScreenCommand.SetProgress) {
                int pos = (int)arg;
                progressBarControl1.Position = pos;
            }
        }

        #endregion

        public enum SplashScreenCommand {
            SetProgress,
            Command2,
            Command3
        }
    }
}

The following code snippets (auto-collected from DevExpress Examples) contain references to the ProcessCommand(Enum, Object) 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