Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Keypress event in the form problem
Message
De
15/07/2014 00:13:28
Yim Ming Sun Derek
Spacious Design Consultant
Hong Kong, Hong Kong
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Keypress event in the form problem
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01603679
Message ID:
01603679
Vues:
39
Hi,
I want the user when press the ESC key to quit the application.
but the following code in the Keypress event of the form not work.

It have error at the line of QUIT statement.


LPARAMETERS nKeyCode, nShiftAltCtrl
IF nKeyCode = 27
eMessageTitle = 'Quit'
eMessageText = "Are you want to quit ?"
nDialogType = 4 + 16 + 256
* 4 = Yes and No buttons
* 16 = Stop sign icon
* 256 = Second button is default

IF MESSAGEBOX(eMessageText, nDialogType, eMessageTitle) = 6
QUIT
ENDIF
ENDIF
/PRE>

Please advise.
Derek
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform