Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Vfp5a Nodefault/DoDefault help
Message
From
03/03/2000 06:21:20
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Vfp5a Nodefault/DoDefault help
Miscellaneous
Thread ID:
00341137
Message ID:
00341137
Views:
58
Hi,

I had a form with text control. I had enable the form keypreview properties to true and had code in the keypress event of the form to check for keyboard entry. I want to display the string only on Enter key detect with the code shown below, but it didn't work.
It can display the string enter but can't show in the text box.
What is wrong, please advise me. Thank you

FORM.KeyPress
LPARAMETER nKeyCode, nShiftAlt

NODEFAULT

* if enter key detect
IF nKeyCode = 13
Dodefault(nKeyCode,nShiftAlt)

= MessageBox('The string enter = '+THISFORM.frmBuffer)
THISFORM.txtDisplay.Value = THISFORM.frmBuffer

ELSE

THISFORM.frmBuffer = THISFORM.frmBuffer+CHR(nKeyCode)

ENDIF
Best Regards
Virusim
Next
Reply
Map
View

Click here to load this message in the networking platform