Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Keypress event in the form problem
Message
 
À
15/07/2014 00:13:28
Yim Ming Sun Derek
Spacious Design Consultant
Hong Kong, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
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:
01603684
Vues:
52
>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

Instead of QUIT use CLEAR EVENTS.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform