delphi progress bar

i have a blank splash screen. it takes 8 seconds to load. how would i simulate a progress bar so the bar goes up and down the frames. ?

SonicM3Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

thiagoblimeiraCommented:
Hello
Which version of delphi are you using? if version >= 2007 you can use the set the style property of the progress bar to pbstMarquee, this way you get a nitty effect as shown below. This way you don't need to inform any information about completion.

Hope this helps

If this is not what you want then tell me please
splash1.jpg
splash2.jpg
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
SonicM3Author Commented:
hey thats amazing man, thanks so much!!!!!

also, what if im not using a splash, could i simulate progress betweeb pages with a progress bar and a timber?
0
SonicM3Author Commented:
ps: im using delphi 6 :(
0
HTML5 and CSS3 Fundamentals

Build a website from the ground up by first learning the fundamentals of HTML5 and CSS3, the two popular programming languages used to present content online. HTML deals with fonts, colors, graphics, and hyperlinks, while CSS describes how HTML elements are to be displayed.

SonicM3Author Commented:
this is supposed to work when button is pressed but its got no event foe a timer and it gives an error on the last bit of code,

procedure TForm1.Button1Click(Sender: TObject);
begin
 Timer1.Enabled := True;end;
procedure TForm1.Timer1Timer(Sender: TObject);
const  cnt: integer = 1;
begin
  ProgressBar1.Position := cnt;
 if cnt = 1 then Label1.Caption := 'Waiting...'  
else
 if cnt = 100 then begin    Label1.Caption := 'Done!';  
  Timer1.Enabled := False;
 end
else    
Label1.Caption := 'Working...';
  Inc(cnt);
end;
end.


error is on inc(cnt);

any ideas how to fix it ?
0
thiagoblimeiraCommented:
You can use this component
MarqueeProgressBar v.1.0

http://www.torry.net/vcl/indicat/meters/sgmarqueeprogressbar.zip

This component encapsulates the marquee style above.
Just install and test.

Hope this helps
0
SonicM3Author Commented:


procedure TTimeOutForm.Button1Click(Sender: TObject);
var
  selected : string;
begin
  Timer1.Enabled := false;
 
 
 
 
 
  if Sender is TTimer then
  begin
    ShowMessage('confirmed ');
  end
  else //Sender is Button
  begin
 
  end;
end;
 
procedure TTimeOutForm.FormCreate(Sender: TObject);
begin
  Timer1.Interval := 10;
  ProgressBar1.Max := 300; //300 * 10 = 3000 := 3 seconds
  ProgressBar1.Position := 0;
 
  Timer1.Enabled := true;
end;
 
procedure TTimeOutForm.Timer1Timer(Sender: TObject);
begin
  ProgressBar1.StepBy(1);
  if  ProgressBar1.Position = (ProgressBar1.Max) then
  begin
    Button1Click(Timer1);
  end;
end;

Open in new window

0
SonicM3Author Commented:
thanksfor your answers guys, but i just this second figured it out and saw ur posts late.  thanks anyway i really appreciate it.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Editors IDEs

From novice to tech pro — start learning today.