🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #2214

Re: Strange problem when using Indy 9 ftp/http

#2214
From: Remy Lebeau (TeamB)
Date: Thu, 20 Jul 2006 15:52
29 lines
1986 bytes
"David Ayre" <davidcayre@ntlworld.com> wrote in message
news:44bf7f5b$1@newsgroups.borland.com...

> The application then downloads a file from my website. However,
> what happens on other computers is that the form appears and
> remains blank until I move the mouse pointer over it. Then it
> springs into life.

Indy is a blocking library.  Since you are using it in the main thread,
while it is downloading, the message queue cannot process new messages,
including painting messages.  Either drop a TIdAntiFreeze onto the form, or
else call the form's Update() method in the TIdHTTP's OnWork events, or else
move the TIdHTTP to a separate thread.

> Application->HandleMessage();

You are processing only a single message, not all pending messages.  Call
ProcessMessages() instead of HandleMessage().

> sprintf(acCaption,"Downloading %s",acFile);
> Label1->Caption = acCaption;

Try calling the form's Update() method just before calling TIdHTTP::Get().
That will update the form's display just before TIdHTTP then blocks the
message queue.


Gambit
Technical Details
Message-ID: <44bfa799$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <44bf7f5b$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,360df355476f8a7a
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <44bf7f5b$1@newsgroups.borland.com>
Subject: Re: Strange problem when using Indy 9 ftp/http
Date: Thu, 20 Jul 2006 08:52:39 -0700
Lines: 31
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 68.69.17.41
Message-ID: <44bfa799$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1153410969 68.69.17.41 (20 Jul 2006 08:56:09 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail