Skip to main content
All docs
V24.1

IOverlaySplashScreenHandle.QueueFocus(IntPtr) Method

Allows you to specify the control that should be focused when the Overlay Form is closed.

Namespace: DevExpress.XtraSplashScreen

Assembly: DevExpress.XtraEditors.v24.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

bool QueueFocus(
    IntPtr controlHandle
)

Parameters

Name Type Description
controlHandle IntPtr

A handle of the control that should be focused when the Overlay Form is closed.

Returns

Type Description
Boolean

true if the control is successfully specified; otherwise, false.

Remarks

Use the Close() method to close the Overlay Form.

When you display an Overlay Form, the focused control loses focus. When the Overlay Form is closed, this control gets focus back. The QueueFocus(Control) and QueueFocus(IntPtr) methods allow you to specify the control that should be focused when the Overlay Form is closed. Pass IntPtr.Zero to prevent all controls from having focus.

You can also use the QueueCloseUpAction(Action) method to specify the action that should be executed when the Overlay Form is closed.

Example

The code below shows how to not focus any control when an Overlay Form is closed.

void ReloadData() {
    using(var handle = SplashScreenManager.ShowOverlayForm(gridControl)) {
        handle.QueueFocus(IntPtr.Zero); 
        ReloadDataCore();
    }
}         
Private Sub ReloadData()
    Using handle = SplashScreenManager.ShowOverlayForm(gridControl)
        handle.QueueFocus(IntPtr.Zero)
        ReloadDataCore()
    End Using
End Sub
See Also