Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Keypress event in the form problem
Message
 
To
15/07/2014 00:13:28
Yim Ming Sun Derek
Spacious Design Consultant
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01603679
Message ID:
01603684
Views:
51
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform