>>>Yep - Sleep():
>>>
>>>
DECLARE Sleep IN WIN32API INTEGER dwMilliseconds
>>>=Sleep(nTimeToIdleIn Milliseconds)
>>
>>That was one of the first things I tried. But Sleep() stops everything and the Winsock events don't arrive while in Sleep().
>
>I didn't expect it to work, but Eric asked, so I told him. It suspends the current thread, so it's no surprise that it won't help, since the Winsock control would be running in the same thread as the VFP in-process COM server.
Exactly.
One thing that could be done is create a second thread in a separate process and then use WaitForSingleObject. It's a very common technique in C/C++
In some situations I've found that VFP code behaves a bit different regarding thread/process management, so this approach may or may not work.
R. Davila
DBA / Network Administrator
Administracion de Fomento Comercial
Gobierno de Puerto Rico
Still waiting for FoxPro for LINUX