Solved

Indy 9

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

Independent Software Vendors: 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
Using idhttp to login to instagram 2 118
How to convert memory stream to PDF file 6 178
Twebbrowser in Fire monkey android scrolling to bottom 1 67
DBCtrlGrid, Delphi, Scroll 7 32
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…
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…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

749 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