Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Possible bug in keypress
Message
From
02/08/2007 15:57:27
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01245609
Message ID:
01245653
Views:
89
>>>Keypress is the event representation of GRID or COMBO controls :-) BUGgy but can't leave w/o them. Somethimes it asks me to add DODFEAULT() w/o NODEFAULT and just when I thought I figured out what happens that event changes its mind and start behaves differently :-)
>>
>>:-))
>
>BTW, in fact it enters in the IF
>I just tried this, Add 3 other textboxes in the form and change Keypress event of the Text1 to be:
>
>LPARAMETERS nKeyCode, nShiftAltCtrl
>thisform.Text2.Value = nKeyCode
>thisform.Text3.Value = IsAlpha(Chr(nKeyCode))
>thisform.Text4.Value = []
>if IsAlpha(Chr(nKeyCode)) AND nKeyCode=>0 && Remove the first && to see the bug
>   thisform.Text4.Value = [Here -]+Chr(nKeyCode)
>   DoDefault(Asc(Upper(Chr(nKeyCode))))
>   NODEFAULT
>ENDIF
>
>When I press [d] textbox4 value is [Here - d] but TextBox1 Value is w/o [D] in it.
>So maybe some binary operations are involved between two parameters before they are sent back to KeyPress Event.

So keypress is like women, you can't live with them, and you can't live without the! :-) (Duck!)

NB! I have been married for almost 29 years, meaning I have learnt to live with both. :-))
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform