General information
Category:
Coding, syntax & commands
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only