?
Solved

Program loading progress indicator-How to

Posted on 1998-12-16
11
Medium Priority
?
282 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

743 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