Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inkey() returns only 0
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01332212
Message ID:
01332734
Views:
13
Non of my fuctions are getting updated inkey(), On Key Label and etc. inside the loop i'm calling a webService using:
o=CREATEOBJECT('MSXML2.ServerXMLHTTP.4.0')
well here is the exact code and form KeyPreview = .t.
LOCAL ctr
ctr = 1
 
DO WHILE 1 = 1
	

*!*		IF ctr > 30
*!*			EXIT
*!*		ENDIF 

	ACTIVATE SCREEN _screen 
	?INKEY(), LASTKEY(), CHRSAW() 
 
	IF INKEY() = 27
		EXIT
	ENDIF 
	
	thisform.ProccessNextTran()

	IF thisform.NextCount = 0
		=MESSAGEBOX('Done...',64,'Sync')
		EXIT
	ENDIF 
		
	IF thisform.RetVal < 0
		=MESSAGEBOX('Error...',64,'Sync')
		EXIT
	ENDIF 

	ctr = ctr + 1
	
ENDDO 
>Hi Mike,
>
>if you need to cancel a loop, can't you use a button to set a flag and then use DOEVENTS to let VFP process button clicks? If you have to use the keyboard, another possibility would be to set a cancel flag in an ON KEY LABEL.
>
>FWIW, your code works for me, after added some code for the ctr variable.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform