SplashScreenManager.ShowOverlayForm(Control, Nullable<Boolean>, Nullable<Boolean>, Nullable<Color>, Nullable<Color>, Nullable<Int32>, Image, IOverlayWindowPainter, String, Nullable<ImageRotationParams>, Nullable<Int32>) Method
Shows an Overlay Form with the specified options over the specified control.
Namespace: DevExpress.XtraSplashScreen
Assembly: DevExpress.XtraEditors.v19.2.dll
Declaration
public static IOverlaySplashScreenHandle ShowOverlayForm(
Control owner,
bool? fadeIn = default(bool? ),
bool? fadeOut = default(bool? ),
Color? backColor = default(Color? ),
Color? foreColor = default(Color? ),
int? opacity = default(int? ),
Image image = null,
IOverlayWindowPainter customPainter = null,
string skinName = null,
ImageRotationParams? rotationParameters = default(ImageRotationParams? ),
int? startupDelay = default(int? )
)
Parameters
Name | Type | Description |
---|---|---|
owner | Control | The control over which the overlay form will be shown. |
Optional Parameters
Name | Type | Default | Description |
---|---|---|---|
fadeIn | Nullable<Boolean> | *null* | True, if fade-in animation is enabled; otherwise, False. |
fadeOut | Nullable<Boolean> | *null* | True, if fade-out animation is enabled; otherwise, False. |
backColor | Nullable<Color> | *null* | The Overlay Form’s background color. |
foreColor | Nullable<Color> | *null* | The Overlay Form’s foreground color. |
opacity | Nullable<Int32> | *null* | The Overlay Form’s transparency level. 0 corresponds to total transparency, 255 - to the normal state. |
image | Image | *null* | The image shown rotating in the Overlay Form’s center. |
customPainter | DevExpress.XtraSplashScreen.IOverlayWindowPainter | *null* | An IOverlayWindowPainter object that performs the Overlay Form’s custom draw. |
skinName | String | *null* | The Overlay Form’s skin. |
rotationParameters | Nullable<DevExpress.XtraSplashScreen.ImageRotationParams> | *null* | The Overlay Form’s rotation parameters. The Ticks parameter specifies the number of frames per rotation. The Duration parameter specifies the length, in milliseconds, of a single rotation. |
startupDelay | Nullable<Int32> | *null* | A display delay. |
Returns
Type | Description |
---|---|
DevExpress.XtraSplashScreen.IOverlaySplashScreenHandle | A handle for the shown Overlay Form. Use this handle to close the Overlay Form. |
Remarks
Call the ShowOverlayForm method to show an Overlay Form with the specified 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(
owner: this.xtraTabPage1,
fadeIn: true,
fadeOut: true,
backColor: Color.Blue,
foreColor: Color.Black,
opacity: 127,
image: Image.FromFile("image.png"),
startupDelay: 2000);
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.