Solved

Program loading progress indicator-How to

Posted on 1998-12-16
11
265 Views
Last Modified: 2010-05-18
How to show the program loading through a progress indicator
component (Progreesbar/Gauge component)in the opening Splash screen form?
Is there a free component for such a purpose?
regards
venks
0
Comment
Question by:venks
  • 5
  • 3
  • 3
11 Comments
 
LVL 2

Expert Comment

by:trillo
ID: 1351411
If I understand well, you want to show a progress bar while your project is loading... but if you are refering to the process of loading the MainForm, for example, you can't show a status bar....
A progress bar can be usefull if you are loading a lot of information from registry entries, initalization files, and data files... because you're program knows exactly how much has been loaded and how much hasn't,,, and you reflect this on a progress bar, but you can't handle a progress bar, for example, to show the progress of the loading process of a single form.

Trillo
0
 
LVL 4

Expert Comment

by:BoRiS
ID: 1351412
venks

In your Project source add something like this, you will see my splash form is called SplashForm I create it first then show it then start the progress then update it, if you want me to send a full demo to you just leave your mail address...

begin
  Application.Initialize;
  Application.CreateForm(TSplashForm, SplashForm);
   SplashForm.Show;
   SplashForm.ProgressBar1.Position := 30;
   SplashForm.Update;
  Application.CreateForm(TForm1, Form1);
   SplashForm.ProgressBar1.Position := 60;
  Application.CreateForm(TForm2, Form2);
   SplashForm.ProgressBar1.Position := 90;
  Application.CreateForm(TForm3, Form3);
   SplashForm.ProgressBar1.Position := 100;
   SplashForm.Hide;
  Application.Run;
end.

Later
BoRiS
0
 
LVL 2

Expert Comment

by:trillo
ID: 1351413
Boris... that's a good answer but It works only fine if you have at least 2 or 3 forms.... and I see that you set a value of 30 to the progress bar when the Splash screen is loaded... That's not a pretty good solution because when the Splash form is finished with loading the progress bar MUST IN THAT MOMENT START FROM 0, That is the purpose of the progress indicator....

Otherwise it's like tricky if you havo only two forms and one of them is the Splashscreen, you would then show two values.... 50% When Splash is loaded and 100% when Form1 is loaded.....  So you never show a 0% ??
0
 
LVL 4

Expert Comment

by:BoRiS
ID: 1351414
trillo

you are quite right there, but this is the only way I found to do it, I tried various ways and this is the only one that worked...

Later
BoRiS
0
 
LVL 1

Author Comment

by:venks
ID: 1351415
Dear Boris
I am rejecting your question for now becuse i have some doubts.
I will award you the points later on.
If there are 5 forms will the progressbar(in Gauge compo) show an increase of 20% after each form or will it show the exact percentage depending on each form's size.
I  have yet to try out your code.I will do that and get back to you.
Regards
venks
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 2

Expert Comment

by:trillo
ID: 1351416
As you can see, Boris' answer could work fine if you're loading several forms... But you have to realize that you should enter the percentage values manually, that method won't do it automatically for you... This means that if you have, for example 5 forms, and only the first one is very huge and heavy you could assign values like:
form1   40%
form2   15%
form3   15%
form4   15%
form5   15%

You put these values depending on your own judgement.

Trillo
0
 
LVL 4

Expert Comment

by:BoRiS
ID: 1351417
venks

No problem, try it out...as trillo mentioned the percentage must be done manually but it works and looks fine...

Later
BoRiS
0
 
LVL 1

Author Comment

by:venks
ID: 1351418
DEar Boris
I have tried out your code and it works.Even though  i have not got all the answers for my query i have to award the points to you.Can you post the answer so that i can award the points to you.
regards and thanks
venks
0
 
LVL 4

Accepted Solution

by:
BoRiS earned 20 total points
ID: 1351419
venks

Here is that answer, what else is it you need to know

Later
BoRiS

0
 
LVL 1

Author Comment

by:venks
ID: 1351420
Dear Boris
Thanks for the answer.Is it possible to find the file size and time to load each file for progress bar indication.
More over how are forms that are created at run time be accounted for
Thanks
venks
0
 
LVL 4

Expert Comment

by:BoRiS
ID: 1351421
venks

Let me take a look at it and I'll get back to you...

Later
BoRiS
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This video discusses moving either the default database or any database to a new volume.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now