Solved

Indy 9

Posted on 2002-06-23
3
150 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

ScreenConnect 6.0 Free Trial

Check out the updates in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI that improves session organization and overall user experience. See the enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi selector screen 2 79
drawing animated level bar based on numbers 3 97
How to debug For loops? 3 49
When i run adoquery my application freezes 26 166
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

777 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