Article View: borland.public.cppbuilder.internet.socket
Article #1892Re: cancel download
From: Remy Lebeau (TeamB)
Date: Mon, 25 Sep 2006 16:59
Date: Mon, 25 Sep 2006 16:59
21 lines
1662 bytes
1662 bytes
"anton" <acvoosten@zeelandnet.nl> wrote in message news:4517bf57@newsgroups.borland.com... > Using TidFtp, I sometimes have to download a lot of > data. During this download I can't access any button The only way that can happen is if you are performing the download in the context of the main thread. It is not a good idea to perform lengthy blocking operations within the main thread. Move the download code into a worker thread instead. Then the main thread remains free to manage the UI only. > so for me it's impossible to cancel the download If I would so. It is not impossible. If you do not use a worker thread, then you will have to call Application->ProcessMessages() inside of the TIdFTP's OnWork events periodically. Gambit
Technical Details
Message-ID:
<45180c72$3@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.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-mailReferences:
<4517bf57@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,bf7bebd369250d51 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: <4517bf57@newsgroups.borland.com> Subject: Re: cancel download Date: Mon, 25 Sep 2006 09:59:00 -0700 Lines: 23 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: 69.169.4.232 Message-ID: <45180c72$3@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1159203954 69.169.4.232 (25 Sep 2006 10:05:54 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.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