Where to put long-running startup code when using SplashPanel?

I would like to display a Splash screen at startup to display an image and some status info during our initial database operations, which can take a few seconds. 

Based on the Syncfusion docs and samples I think I need a SplashControl with a SplashPanel that hosts the image and status label field. Is that correct?

Anyway, if I place my database initialization code in Form1_Shown() or splashControl1_SplashDisplayed(), then the SplashPanel's label & image fields don't get displayed until after my DB init code completes. 

Is there a working example of a SplashControl or SplashPanel displayed during some long-running initialization code?

There was some discussion of a related issue in How to load a "GIF" image in SplashControl or SplashPanel ?, but the sample code is no longer available.

Thanks,
Dean

8 Replies

VR Vijayalakshmi Roopkumar Syncfusion Team October 14, 2020 01:38 PM UTC

Hi Dean 
 
Thank you for using your syncfusion products. 
 
We have checked the reported requirement with SplashPanel/Splash control, but we are unable to predict what your exact requirement is and what does your meant about long operation at your end. If possible, could you share us your video that shows your problem, so that we could able to check at our end and provide you the prompt solution accordingly. 
 
Regards, 
Vijayalakshmi VR 
 



DE deanwiles October 14, 2020 08:56 PM UTC

Attached is a sample that demonstrates the problem. I have placed a call to Thread.Sleep(3000); to simulate the delay caused by our database initialization.

Below is what the app looks like during the startup code. The blue background of the splash screen is displayed, but not the label or image controls.

It appears that I should not put any long-running code in the Form1_Shown() or splashControl1_SplashDisplayed() events, so I'm hoping you can indicate whether I am using the SplashControl/SplashPanel correctly or what event I should hook into for my long-running database initialization code.

Thanks.



Attachment: SplashTest_92ad1bad.zip


BR Bharathi Rajakantham Syncfusion Team October 15, 2020 03:36 PM UTC

Hi Dean, 
 
We are able to reproduce the reported issue from our side.we have forwarded it to our development team.We will update you the further details on october 19 2020.Please let us know if you have any other concerns. 
 
 
Regards, 
Bharathi R 



DE deanwiles October 20, 2020 02:21 PM UTC

Have you received any input from your development team on this inquiry?
Thanks,
Dean


BR Bharathi Rajakantham Syncfusion Team October 21, 2020 12:41 PM UTC

Hi Dean, 


Thanks for your patience, 

We have checked your query” where to put long-running startup code when using splash panel”.You can achieve your requirement using the “TimerInterval” Property.Please check the sample and the help documentation for your reference. 


this.splashPanel1.TimerInterval = 5000; 







Please let us know if you have any other concerns. 


Regards, 
Bharathi R 




DE deanwiles October 21, 2020 04:24 PM UTC

Hello Bharathi,
Thank you for your reply, but adding the line below has no effect, as the SplashPanel TimerInterval already defaults to 5000 milliseconds.
this.splashPanel1.TimerInterval = 5000; 

I don't think you are understanding my problem. The call to Thread.Sleep(3000); was there to simulate the delay caused by our database initialization. In the modified sample code, it appears you removed that call so the modified sample no longer represents the problem and does not offer a solution.




DE deanwiles October 21, 2020 10:14 PM UTC

FYI, I just added a timer control to the form and set the timer event to run once after Form1_Shown(). When the timer event fires I disable the timer, perform the long-running code, and then hide the SplashControl.
The updated sample code is attached.

Attachment: SplashTest_1acc29cf.zip


BR Bharathi Rajakantham Syncfusion Team October 22, 2020 03:02 PM UTC

Hi Dean, 
 
 
Thanks for your update, 
 
We have checked your query with the given sample the splash panel is displayed quickly, so can you please let us know whether you are mentioning that the reported case is resolved at your end using the timer. If not can you please provide us more details so that we will get a clear understanding to further proceed. We will be glad to assist you. 
 
 
Please let us know if you have anyother concerns. 
 
Regards, 
Bharathi R 


Loader.
Up arrow icon