Mega Search
23.2 Million


Sign Up

Make a donation  
Firemonkey SplashScreen Problem  
News Group: embarcadero.public.delphi.firemonkey

Hi!

I have a complex APP which takes about 9-10 seconds to startup.
The problem is that while the Splashscreen appears immediately, it goes off after 2 seconds.
On the remaining 8 seconds, the screen is completly blank.
The foms are created, and then Application.Run is fired, but until the first form is FormActivated ... there is at least 4-5 seconds delay.

I can't make a custom Splashscreen.Show, because it doesn't show at all, until all packages are loaded.

Anybody have a workaround?

Vote for best question.
Score: 0  # Vote:  0
Date Posted: 17-Jan-2015, at 8:53 AM EST
From: =?Utf-8?Q?L=C3=A1szl=C3=B3_Mlnvszky
 
Re: Firemonkey SplashScreen Problem  
News Group: embarcadero.public.delphi.firemonkey
I found that (at least on iOS), the forms are actually created in Application.Run, while the Application.CreateForm simply adds the form to an internal list for later creation. This means that most of the loading time happens *after* calling Application.Run, and there is no event you can set to be informed when the application has finished loading and is actually running. 

Only workaround I found was to add an OnCreate event to the last form in the list, which will happen close to the end of loading.


> {quote:title=László Mlnvszky wrote:}{quote}
> Hi!
> 
> I have a complex APP which takes about 9-10 seconds to startup.
> The problem is that while the Splashscreen appears immediately, it goes off after 2 seconds.
> On the remaining 8 seconds, the screen is completly blank.
> The foms are created, and then Application.Run is fired, but until the first form is FormActivated ... there is at least 4-5 seconds delay.
> 
> I can't make a custom Splashscreen.Show, because it doesn't show at all, until all packages are loaded.
> 
> Anybody have a workaround?

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 19-Jan-2015, at 2:11 AM EST
From: Hans Jakobsen
 
Re: Firemonkey SplashScreen Problem  
News Group: embarcadero.public.delphi.firemonkey
Yes, I have lot of controls on the main form.
So I'm gonna redesign this. Maybe add an initial "startup form" first. 
Great approach, thank for the help!

I think it's gonna solve it!

> {quote:title=Linden ROTH wrote:}{quote}
> > {quote:title=László Mlnvszky wrote:}{quote}
> > Interesting Idea, thanks!
> > 
> > I don't do time-taking operations on startup, so i don't now what takes so much time.
> > But maybe setting a 2nd splashscreen the main form can be a solution.
> > 
> Do you have lots of controls etc ... move them off the main form and either 
> create dynamically after startup or 
> use frames that are show when required only or 
> have our initial form as a splash only and have it load your App
> 
> > What's the point of the "main screen" anyway? 
> > 
> It the app! ???????
> 
> --
> Linden
> "Mango" was Cool but "Wasabi" was Hotter but remember it's all in the "source"
> 
> Edited by: Linden ROTH on Jan 18, 2015 3:26 AM

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 18-Jan-2015, at 3:57 AM EST
From: =?Utf-8?Q?L=C3=A1szl=C3=B3_Mlnvszky
 
Re: Firemonkey SplashScreen Problem [Edit]  
News Group: embarcadero.public.delphi.firemonkey
> {quote:title=László Mlnvszky wrote:}{quote}
> Interesting Idea, thanks!
> 
> I don't do time-taking operations on startup, so i don't now what takes so much time.
> But maybe setting a 2nd splashscreen the main form can be a solution.
> 
Do you have lots of controls etc ... move them off the main form and either 
create dynamically after startup or 
use frames that are show when required only or 
have our initial form as a splash only and have it load your App

> What's the point of the "main screen" anyway? 
> 
It the app! ???????

--
Linden
"Mango" was Cool but "Wasabi" was Hotter but remember it's all in the "source"

Edited by: Linden ROTH on Jan 18, 2015 3:26 AM

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 18-Jan-2015, at 3:27 AM EST
From: Linden ROTH
 
Re: Firemonkey SplashScreen Problem  
News Group: embarcadero.public.delphi.firemonkey
Interesting Idea, thanks!

I don't do time-taking operations on startup, so i don't now what takes so much time.
But maybe setting a 2nd splashscreen the main form can be a solution.

What's the point of the "main screen" anyway? 

> {quote:title=Linden ROTH wrote:}{quote}
> > {quote:title=László Mlnvszky wrote:}{quote}
> > Hi!
> > 
> > I have a complex APP which takes about 9-10 seconds to startup.
> > The problem is that while the Splashscreen appears immediately, it goes off after 2 seconds.
> > On the remaining 8 seconds, the screen is completly blank.
> > The foms are created, and then Application.Run is fired, but until the first form is FormActivated ... there is at least 4-5 seconds delay.
> > 
> > I can't make a custom Splashscreen.Show, because it doesn't show at all, until all packages are loaded.
> > 
> > Anybody have a workaround?
> 
> Active a 100ms timer in your form create and do you complex stuff in the timer event - (make the default form like a 2nd splash screen ... eg copyright notice etc)
> 
> --
> Linden
> "Mango" was Cool but "Wasabi" was Hotter but remember it's all in the "source"

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 18-Jan-2015, at 2:14 AM EST
From: =?Utf-8?Q?L=C3=A1szl=C3=B3_Mlnvszky
 
Re: Firemonkey SplashScreen Problem  
News Group: embarcadero.public.delphi.firemonkey
> {quote:title=László Mlnvszky wrote:}{quote}
> Hi!
> 
> I have a complex APP which takes about 9-10 seconds to startup.
> The problem is that while the Splashscreen appears immediately, it goes off after 2 seconds.
> On the remaining 8 seconds, the screen is completly blank.
> The foms are created, and then Application.Run is fired, but until the first form is FormActivated ... there is at least 4-5 seconds delay.
> 
> I can't make a custom Splashscreen.Show, because it doesn't show at all, until all packages are loaded.
> 
> Anybody have a workaround?

Active a 100ms timer in your form create and do you complex stuff in the timer event - (make the default form like a 2nd splash screen ... eg copyright notice etc)

--
Linden
"Mango" was Cool but "Wasabi" was Hotter but remember it's all in the "source"

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 17-Jan-2015, at 12:42 PM EST
From: Linden ROTH