Solved

Indy 9

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

690 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