Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Inkey() returns only 0
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01332212
Message ID:
01332734
Vues:
12
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform