Solved

Program loading progress indicator-How to

Posted on 1998-12-16
11
274 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

815 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

8 Experts available now in Live!

Get 1:1 Help Now