Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Delay for one second
Message
From
27/11/2007 04:04:19
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01271026
Message ID:
01271395
Views:
32
It seem can't work with me. :(

When I replace inkey(.01) WITH sleep(10). The TIME OUT error with prompt out.

I try using inkey(.1). But inkey(.01) still waste a lot of time. It seem that inkey(.01) is the smallest interval. When I try inkey(.001) it seem not much different with inkey(.01)



There is my code :

THISFORM.mSendUDP &&Winsock UPD

DECLARE Sleep IN WIN32API Long

THIS.pBusy = .T.
THISFORM.oleControl1.sendData(THIS.pcStr2Snd)
mWaitCnt = 1
DO WHILE THIS.pBusy AND mWaitCnt < 10
INKEY(.01)
* Sleep(50)
mWaitCnt = mWaitCnt + 1
ENDDO

IF THIS.pBusy
MESSAGEBOX('TIMEOUT')
ENDIF




THISFORM.oleControl1.DataArrival

lcBuffer= SPACE(bytesTotal)
THIS.getData(@lcBuffer,8,bytesTotal)
THIS.pBusy = .F.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform