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

SplashScreenManager.ShowOverlayForm(Control) Method

Shows an Overlay Form with the default options over the specified control.

Namespace: DevExpress.XtraSplashScreen

Assembly: DevExpress.XtraEditors.v19.1.dll

Declaration

public static IOverlaySplashScreenHandle ShowOverlayForm(
    Control owner
)

Parameters

Name Type Description
owner Control

A Control that should be overlapped by an Overlay Form.

Returns

Type Description
DevExpress.XtraSplashScreen.IOverlaySplashScreenHandle

A handle for the Overlay Form shown. Use this handle to close the Overlay Form.

Remarks

Call the ShowOverlayForm method to show an Overlay Form with the default options over the owner control.

Warning

You can only show an Overlay Form over a control/form that has a handle (see IsHandleCreated). Otherwise, an exception is thrown.

The ShowOverlayForm method returns an IOverlaySplashScreenHandle object. Pass this handle to the SplashScreenManager.CloseOverlayForm method to close the opened Overlay Form.

using DevExpress.XtraSplashScreen;
//... 
public partial class ModuleOverlayForm : TutorialControl {

    public ModuleOverlayForm() {
        InitializeComponent();
    }
    //...
    void OnShowClick(object sender, EventArgs e) {
      IOverlaySplashScreenHandle _handle = SplashScreenManager.ShowOverlayForm(this.xtraTabPage1);
      Timer timer = new Timer() { Interval = 4000 };
      timer.Tick += (ss, ee) => {
          SplashScreenManager.CloseOverlayForm(_handle);
          //You can also use the handle's Close method to close the form.
          //_handle.Close();
          timer.Dispose();
      };
      timer.Start();
    }
}

Note

Run the XtraEditors demo for the complete example.

See Also