Robert Chafer wrote:
> If it is asynchronous ... isn't a UI that responds the default?
Usually it is, however there is a small difference between GUI
messages being queued in the message queue and notification
messages from winsock being sent to the hidden ICS window directly.
If you transfer on very fast lines it may happen that there's no
time left to retrieve and process messages from the message queue
if those notifications from winsock come in fast enough.
WM_PAINT and the like are queued and so have less piority. That's
why the OP saw an improvement calling ProcessMessages from a
timer event, timer messages are not queued as well. Be aware that
calling ProcessMessages from any ICS event handler can lead to
strange and buggy component behaviour.
Never ever call the message pump from component's event handlers,
except you know very well what you are doing.
> On Sun, 11 Nov 2007 09:25:31 -0800, you wrote:
>> I have a simple program that downloads a large file using the HTTP
>> Client. How would one keep the user interface responsive during a
>> long asynchronous download?
>> I have tried a number of things and finally ended up adding a timer
>> with an Application.ProcessMessages in it. Is there a better way to
>> keep the UI responsive for button clicks and such?
>> Johnnie Norsworthy
> Robert Chafer
> Silverfrost Limited
> Office: +44 (0)161 795 1980
> Email: [EMAIL PROTECTED]
> Web: http://www.silverfrost.com
> The contents of this message and any attachments to it are
> confidential and may be legally privileged. If you have received this
> message in error you should delete it from your system immediately
> and advise the sender. To any recipient of this message within
> Silverfrost, unless otherwise stated, you should consider this
> message and attachments as Silverfrost confidential.
> Silverfrost Limited is registered in England, Company Number 3447013,
> 4 Coulsden Drive, Manchester, M9 6AP, United Kingdom.
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be