Board index » delphi » D1: Showing a progress bar while the BDE loads

D1: Showing a progress bar while the BDE loads

Hi,

the release date of my database app gets closer and I have
to to some finetuning.

I need to show the user a progress bar while the app starts
as this takes 5-10 sec. Most of the time is consumed by loading
the BDE and initializing/creating all the objects on my
Mainform.

But how can I update the progress bar? How do I know how much
of the BDE is loaded, how many objects are created and so on?

(Showing a splash screen is no problem).

Appreciating your help, W.L.

 

Re:D1: Showing a progress bar while the BDE loads


Quote
Werner Lehmann wrote:

> Hi,

> the release date of my database app gets closer and I have
> to to some finetuning.

> I need to show the user a progress bar while the app starts
> as this takes 5-10 sec. Most of the time is consumed by loading
> the BDE and initializing/creating all the objects on my
> Mainform.

> But how can I update the progress bar? How do I know how much
> of the BDE is loaded, how many objects are created and so on?

> (Showing a splash screen is no problem).

> Appreciating your help, W.L.

Update it with a timer, set at half second intervals, max 20 or so.
Nobody will know the difference <g>
--

Robert

Return address changed to deter malevolent spammers.

Re:D1: Showing a progress bar while the BDE loads


HEY - here is a really neat idea - which I use.  Put a bunch of checkboxes
on the splash, and name each one - so you might have:

Main Form Creating
Database Engine Initialising
Creating Input Forms
etc...

In the project source file, just stick a checkbox1.Checked in between every
so many form creations :)  Play around with it until you have a pretty good
spacing.  As the other guy that replied said "they won't know the
difference anyway" :)

______________________________________

J. A. Frater
jfra...@cripton.com
http://www.cripton.com

http://www.microsoft.com/ie/default.asp
^^^ Click here to start!
 Werner Lehmann wrote in article <33944197.7...@informatik.uni-kiel.de>...

Quote
>Hi,

>the release date of my database app gets closer and I have
>to to some finetuning.

>I need to show the user a progress bar while the app starts
>as this takes 5-10 sec. Most of the time is consumed by loading
>the BDE and initializing/creating all the objects on my
>Mainform.

>But how can I update the progress bar? How do I know how much
>of the BDE is loaded, how many objects are created and so on?

>(Showing a splash screen is no problem).

>Appreciating your help, W.L.

Re:D1: Showing a progress bar while the BDE loads


Werner,

1. Put a TGauge on the splash screen. Lets say there are 10 steps involved
in your initialization routines. Set Gauge.MaxValue to 10 and
Splash.Gauge1.progress:= 0; then after each step use
Splash.Gauge1.progress:= i; inc(i); with i being a global. If your tables
are all initially closed then the BDE is initialized when the first table
is opened.  Since this is probably done in your form.OnCreate procedure,
put some Splash.Gauge1.progress:= i; inc(i); in strategic places there as
well as in the dpr.

OR:

2. use a timer with some graphic animation on the splash form like MS does
for file operations done in the shell.

HTH,

--
Paul Motyer
Soft Stuff, Croydon, Australia, 3136

Werner Lehmann <ingre...@informatik.uni-kiel.de> wrote in article
<33944197.7...@informatik.uni-kiel.de>...

Quote
> Hi,

> the release date of my database app gets closer and I have
> to to some finetuning.

> I need to show the user a progress bar while the app starts
> as this takes 5-10 sec. Most of the time is consumed by loading
> the BDE and initializing/creating all the objects on my
> Mainform.

> But how can I update the progress bar? How do I know how much
> of the BDE is loaded, how many objects are created and so on?

> (Showing a splash screen is no problem).

> Appreciating your help, W.L.

Other Threads