Solved

Program loading progress indicator-How to

Posted on 1998-12-16
11
280 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

717 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