BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Splash screen problem

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage)
View previous topic :: View next topic  
Author Message
Ted Byers
Guest





PostPosted: Fri Nov 21, 2003 5:02 pm    Post subject: Splash screen problem Reply with 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
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





PostPosted: Fri Nov 21, 2003 6:11 pm    Post subject: Re: Splash screen problem Reply with quote



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





PostPosted: Fri Nov 21, 2003 6:20 pm    Post subject: Re: Splash screen problem Reply with quote



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





PostPosted: Fri Nov 21, 2003 7:32 pm    Post subject: Re: Splash screen problem Reply with quote

Giuliano wrote:

Quote:
have a look at this splash screen demo project:

http://81.72.236.130/SplashScreenDemo.zip

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





PostPosted: Fri Nov 21, 2003 8:20 pm    Post subject: Re: Splash screen problem Reply with quote


"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





PostPosted: Fri Nov 21, 2003 9:00 pm    Post subject: Re: Splash screen problem Reply with quote


"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





PostPosted: Fri Nov 21, 2003 9:00 pm    Post subject: Re: Splash screen problem Reply with quote

Thanks Giuliano

Ted


Back to top
Ted Byers
Guest





PostPosted: Fri Nov 21, 2003 9:01 pm    Post subject: Re: Splash screen problem Reply with quote

Hi Gambit,

splash->Update(); was exactly what I needed, and worked flawlessly.

Thanks,

Ted


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.