Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

IOverlaySplashScreenHandle.QueueFocus(Control) Method

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

Namespace: DevExpress.XtraSplashScreen

Assembly: DevExpress.XtraEditors.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

bool QueueFocus(
    Control control
)

#Parameters

Name Type Description
control Control

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.

C#
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