Solved

Indy 9

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

743 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

11 Experts available now in Live!

Get 1:1 Help Now