🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Strange problem when using Indy 9 ftp/http

#2217
From: David Ayre
Date: Fri, 21 Jul 2006 14:54
57 lines
2654 bytes
Thanks Remy,

That seemed to get it working OK, but I'd still appreciate some pointers as to how to use Threads.

Cheers,

David


"David Ayre" <davidcayre@ntlworld.com> wrote:
>
>Thanks Remy,
>
>I'll have a look at those points. However, it does seem to stop
>before the http gets going. Just running the mouse pointer over the form sets it going.
>As to putting it in a separate thread. I haven't used threads.
>Could you give me a few pointers on how to do this, please.
>
>Cheers,
>
>David
>
>
>"Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> wrote:
>>
>>"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: <44c0ea8b$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <44bf7f5b$1@newsgroups.borland.com> <44bfa799$1@newsgroups.borland.com> <44bfbb8c$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: "David Ayre" <davidcayre@ntlworld.com>
Sender: "David Ayre" <davidcayre@ntlworld.com>
Reply-To: "David Ayre" <davidcayre@ntlworld.com>
Subject: Re: Strange problem when using Indy 9 ftp/http
Newsgroups: borland.public.cppbuilder.internet.socket
X-User-Info: 62.252.224.18     
X-Forwarded-For: 81.96.132.239
References: <44bf7f5b$1@newsgroups.borland.com> <44bfa799$1@newsgroups.borland.com> <44bfbb8c$1@newsgroups.borland.com>
NNTP-Posting-Host: 207.105.83.66
Message-ID: <44c0ea8b$1@newsgroups.borland.com>
Date: 21 Jul 2006 07:54:03 -0700
X-Trace: newsgroups.borland.com 1153493643 207.105.83.66 (21 Jul 2006 07:54:03 -0700)
Lines: 58
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail