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