🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.web
Article #1482

tidftp and tcgauge

#1482
From: Jens Harms
Date: Sat, 29 Jan 2005 20:16
48 lines
2042 bytes
hi,

i am using the tidftp indy component for a download. i like to use a tcgauge
so display the staus of the download. here is my code for the onwork and
onworkbegin function:

void __fastcall TForm1::FTPWork(TObject *Sender, TWorkMode AWorkMode,
      const int AWorkCount)
{
 PBImages->Progress = AWorkCount;
 }
//--------------------------------------------------------------------------
-

void __fastcall TForm1::FTPWorkBegin(TObject *Sender, TWorkMode AWorkMode,
      const int AWorkCountMax)
{
 PBImages->MaxValue = AWorkCountMax;
 }
//--------------------------------------------------------------------------
-

bool __fastcall DownLoadFile(AnsiString remote, AnsiString target,
AnsiString folder1, AnsiString folder2)
{
   try
   {
      Form1->FTP->ChangeDir("\\");
      Form1->FTP->ChangeDir(folder1);
      Form1->FTP->ChangeDir(folder2);

      Form1->FTP->Get(remote, target,true, true);
   }
   catch(...)
   {
      return false;
   }
   return true;
}
//--------------------------------------------------------------------------
-

my download works fine, but the visualisation in the cgauge does not works.
the progress will be full after the first bytes arrived.

so why does this not works?

jens
Technical Details
Message-ID: <41fbef1b@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,f46215bb1b9c2953,start
X-Google-Attributes: gidfeeec,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Jens Harms" <jens@harms.ch>
Newsgroups: borland.public.cppbuilder.internet.web
Subject: tidftp and tcgauge
Date: Sat, 29 Jan 2005 21:16:24 +0100
Lines: 50
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 84.129.27.127
Message-ID: <41fbef1b@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1107029787 84.129.27.127 (29 Jan 2005 12:16:27 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail