 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Ted Byers Guest
|
Posted: Fri Nov 21, 2003 5:02 pm Post subject: Splash screen problem |
|
|
Since the constructor for my main form needs to do some significant
processing, I created a splash screen that is explicitly created at the
beginning of the main form's constructor and explicitly closed and deleted
once the processing is complete. There is a progress bar on the splash
screen that is updated during the processing.
The problem is that, at present, there are only three controls on the splash
screen, two labels and the progress bar, but only the progress bar is
properly drawn and updated. The two labels NEVER appear, and the processing
is half done by the time the background of the splash screen is ever
painted. How can I get the Splash screen to properly display itself?
Thanks,
Ted
|
|
| Back to top |
|
 |
Giuliano Guest
|
Posted: Fri Nov 21, 2003 6:11 pm Post subject: Re: Splash screen problem |
|
|
On Fri, 21 Nov 2003 12:02:02 -0500, "Ted Byers" <r.ted.byers (AT) sympatico (DOT) ca>
wrote:
| Quote: | Since the constructor for my main form needs to do some significant
processing, I created a splash screen that is explicitly created at the
[snip] |
Hi Ted,
have a look at this splash screen demo project:
http://81.72.236.130/SplashScreenDemo.zip
Regards
Giuliano
|
|
| Back to top |
|
 |
Hans Galema Guest
|
Posted: Fri Nov 21, 2003 6:20 pm Post subject: Re: Splash screen problem |
|
|
Ted Byers wrote:
| Quote: | How can I get the Splash screen to properly display itself?
|
Add some
Application->ProcessMessages();
to the constructor of the MainForm.
Or maybe only one call before the mainform is created.
Hans.
|
|
| Back to top |
|
 |
Hans Galema Guest
|
Posted: Fri Nov 21, 2003 7:32 pm Post subject: Re: Splash screen problem |
|
|
Giuliano wrote:
It's a nice project.
But please next time tell that the project is in bcb6.
Not everybody uses bcb6.
Hans.
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Fri Nov 21, 2003 8:20 pm Post subject: Re: Splash screen problem |
|
|
"Ted Byers" <r.ted.byers (AT) sympatico (DOT) ca> wrote
| Quote: | The problem is that, at present, there are only three controls on the
splash screen, two labels and the progress bar, but only the progress
bar is properly drawn and updated. The two labels NEVER appear,
and the processing is half done by the time the background of the
splash screen is ever painted. How can I get the Splash screen to
properly display itself?
|
At that point in time, the main message queue is not running yet. So when
you create your splash screen instance, you need to call its Update() method
after calling Show(), ie:
TSplashForm *splash = new TSplashForm(Application);
splash->Show();
splash->Update();
//...
delete splash;
Gambit
|
|
| Back to top |
|
 |
Ted Byers Guest
|
Posted: Fri Nov 21, 2003 9:00 pm Post subject: Re: Splash screen problem |
|
|
"Hans Galema" <dontusethis (AT) dontusethis (DOT) nl> wrote
| Quote: | Ted Byers wrote:
How can I get the Splash screen to properly display itself?
Add some
Application->ProcessMessages();
to the constructor of the MainForm.
Or maybe only one call before the mainform is created.
|
Hi Hans,
Thanks. However, I had already tried this and it didn't work.
Thanks anyway,
Ted
|
|
| Back to top |
|
 |
Ted Byers Guest
|
Posted: Fri Nov 21, 2003 9:00 pm Post subject: Re: Splash screen problem |
|
|
Thanks Giuliano
Ted
|
|
| Back to top |
|
 |
Ted Byers Guest
|
Posted: Fri Nov 21, 2003 9:01 pm Post subject: Re: Splash screen problem |
|
|
Hi Gambit,
splash->Update(); was exactly what I needed, and worked flawlessly.
Thanks,
Ted
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|