Solved

delphi progress bar

Posted on 2009-07-12
8
2,503 Views
Last Modified: 2013-11-23
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. ?

0
Comment
Question by:SonicM3
[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
  • 2
8 Comments
 
LVL 8

Accepted Solution

by:
thiagoblimeira earned 500 total points
ID: 24836521
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
 

Author Comment

by:SonicM3
ID: 24836878
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
 

Author Comment

by:SonicM3
ID: 24836882
ps: im using delphi 6 :(
0
Technology Partners: 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!

 

Author Comment

by:SonicM3
ID: 24838392
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
 
LVL 14

Expert Comment

by:SteveBay
ID: 24838410
0
 
LVL 8

Expert Comment

by:thiagoblimeira
ID: 24838453
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
 

Author Comment

by:SonicM3
ID: 24838550


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
 

Author Comment

by:SonicM3
ID: 24838556
thanksfor your answers guys, but i just this second figured it out and saw ur posts late.  thanks anyway i really appreciate it.
0

Featured Post

Technology Partners: 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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
populate value from mongo db in java 98 424
Newbie Thread Programming 1 202
eclipse luna javeEE perspecive missing 5 123
Export all vba modules from outlook vbaproject.otm 7 72
In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

752 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