Solved

Indy 9

Posted on 2002-06-23
3
149 Views
Last Modified: 2010-04-04
i have a TGauge control on my form and i want it to display the process of my TIdFTP component. So say, the TIdFTP component has downloaded 50% of a file, i want the TGauge's value to eb 50%. If it has downloaded 75% the TGauge value needs to be 75%. Any ideas?
0
Comment
Question by:tim_nash
3 Comments
 
LVL 12

Accepted Solution

by:
Lee_Nover earned 40 total points
ID: 7102231
use the OnWorkBegin, OnWork and OnWorkEnd events of the TidFTP component
you should also use TidAntiFreeze so your form will be updated normaly

something like:

procedure TForm1.ftpOneWorkBegin(Sender: TObject; AWorkMode: TWorkMode;
  const AWorkCountMax: Integer);
begin
     if AWorkMode = wmRead then
        pbFTP.Max:=AWorkCountMax;
end;

procedure TForm1.ftpOneWorkEnd(Sender: TObject; AWorkMode: TWorkMode);
begin
     if AWorkMode = wmRead then
     begin
       pbFTP.Position:=0;
       pbFTP.Max:=0;
     end;
end;

procedure TForm1.ftpOneWork(Sender: TObject; AWorkMode: TWorkMode;
  const AWorkCount: Integer);
begin
     if AWorkMode = wmRead then
        pbFTP.Position:=AWorkCount;
end;

where pbPosition is TProgressBar
or in your case a TGauge ..
0
 

Expert Comment

by:CleanupPing
ID: 9343171
tim_nash:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 5

Expert Comment

by:Lukasz Lach
ID: 9453509
tim_nash,
No comment has been added lately (17 days), so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:

RECOMMENDATION: Award points to Lee_Nover http:#7102231

Please leave any comments here within 7 days.

-- Please DO NOT accept this comment as an answer ! --

Thanks,

anAKiN
EE Cleanup Volunteer
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

867 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

19 Experts available now in Live!

Get 1:1 Help Now