Epicor ICE Framework has a LoadSplash Helper method in the FormFunctions class which you can use without any dependencies.
You should call the after the Form_Shown method, so it can find its parent, as long as you call it anywhere, while your form is visible, it will stick to the form.
FormFunctions.LoadSplash("Printing Labels...");
FormFunctions.CloseSplash(); // Later
More Control
If you want to control the TopMost setting or remove the Owner so you could basically make the splash appear and remain on the center of your screen regardless if the User minimizes the Form, then you have to duplicate Epicor’s Splash Method.
//
// IF YOU WANT TO CONTROL THE TOPMOST BEHAVIOUR
// THEN YOU HAVE TO DUPLICATE FUNCTIONALITY
//
// Add Custom Module Level Variables Here **
private static CustomRespinSplashDialog splash;
// Begin Custom Code Disposal - DestroyCustomCode In Case
CloseSplash();
public void CustomLoadSplash(string msg, bool topMost = false, bool noOwner = false)
{
if (splash == null)
{
splash = new CustomRespinSplashDialog();
}
splash.Message = msg;
Ice.Lib.Framework.EpiBaseForm form = (Ice.Lib.Framework.EpiBaseForm)csm.PersonalizeCustomizeManager.TopControl.FindForm();
if (form != null && noOwner == false)
{
splash.TopMost = topMost;
splash.Owner = form;
}
else {
splash.TopMost = true;
}
splash.Show();
}
public void CloseSplash()
{
if (splash != null)
{
splash.Close();
splash.Dispose();
splash = null;
}
}