>>I know I've seen this before, but I can't remember the answer.
>>
>>How does one put a VFP application to sleep for some number of seconds? In 2.6 I would write a loop which did nothing
>>
>>
>>PROCEDURE sleep
>>PARAMETERS nWait
>>PRIVATE ALL
>>nSeconds = SECONDS()
>>nEnd = nSeconds + nWait
>>DO WHILE SECONDS() < nEnd
>> ** Do Nothing
>>ENDDO
>>
>>
>>I'm pretty sure I've seen a reference to an API call which does the same thing. Could someone please post an example for me???
>>
>
>If you want to be able to wake up on demand:
>
>
>= INKEY([nSeconds])
>
One problem I have noticed with the Sleep() function in VFP is that
it appears to put all VFP applications on your machine to sleep at the same
time.
I noticed this when I wrote an application that sat in the notification area and
checked for a valid internet connection every 30 seconds, this app tried to connect to
www.microsoft.com and if succesful changed the icon to a green one and if not it would go red. After checking it would call Sleep(30000). I noticed that when this program was running I could only type in the VFP IDE during the brief moment that the program was actually doing the checking.
Just my two cents.
Chris Ormerod
Have a nice day :)