Thread View: borland.public.cppbuilder.internet.socket
5 messages
5 total messages
Started by anton
Mon, 25 Sep 2006 11:36
cancel download
Author: anton
Date: Mon, 25 Sep 2006 11:36
Date: Mon, 25 Sep 2006 11:36
11 lines
1126 bytes
1126 bytes
Hi, Using TidFtp, I sometimes have to download a lot of data. During this download I can't access any button, so for me it's impossible to cancel the download If I would so. I'm sure there's must be a way to realize this. Can someone help me? Thanks a lot, Anton
Re: cancel download
Author: 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
Re: cancel download
Author: anton
Date: Mon, 25 Sep 2006 18:19
Date: Mon, 25 Sep 2006 18:19
35 lines
2013 bytes
2013 bytes
Thanks again for your information. Just one stupid question: Do you have a simple example how to make a 'worker thread' ? Regards Anton "Remy Lebeau (TeamB)" <no.spam@no.spam.com> schreef in bericht news:45180c72$3@newsgroups.borland.com... > > "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 > >
Re: cancel download
Author: Remy Lebeau (TeamB)
Date: Mon, 25 Sep 2006 20:37
Date: Mon, 25 Sep 2006 20:37
11 lines
1244 bytes
1244 bytes
"anton" <acvoosten@zeelandnet.nl> wrote in message news:45181d9a$1@newsgroups.borland.com... > Do you have a simple example how to make a 'worker thread' ? Derive a class from TThread, and override its Execute() method. BCB ships with threading examples. Gambit
Re: cancel download
Author: anton
Date: Mon, 25 Sep 2006 21:16
Date: Mon, 25 Sep 2006 21:16
20 lines
1406 bytes
1406 bytes
Thank you I'll find them "Remy Lebeau (TeamB)" <no.spam@no.spam.com> schreef in bericht news:451840a4$1@newsgroups.borland.com... > > "anton" <acvoosten@zeelandnet.nl> wrote in message > news:45181d9a$1@newsgroups.borland.com... > >> Do you have a simple example how to make a 'worker thread' ? > > Derive a class from TThread, and override its Execute() method. BCB ships > with threading examples. > > > Gambit > >
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads