Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
LastKey() and KeyBoard command
Message
 
To
20/04/2007 11:13:31
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01218287
Message ID:
01218304
Views:
25
This message has been marked as the solution to the initial question of the thread.
Try INKEY() to consume keystrokes

or SET TYPEAHEAD TO 0 to purge buffer (set it on again after :)

Bob

>Ok, better, but now I don't want to see a wait window. I just want to change the value of LastKey()...
>
>>You are resolving LastKey in the WAIT command before it has collected the keystrokes which are only consumed while waiting for input
>>
>>Try
>>
>>KEYBOARD '999' clear
>>WAIT WINDOW 'WAITING'
>>? LASTKEY()
>>
>>Bob
>>
>>>Nope, LastKey() value is still 27. Strange. If I use a regular WAIT WINDOW and click the mouse, then the value will change. I'm trying to make sure that at this point in code that the LastKey() value is not 27. I really don't care what it is as long as it's not 27 and not anything that causes an action to fire.
>>>
>>>>Hello Jay,
>>>>
>>>>Try taking out the NOWAIT to give the keystrokes someplace to go.
>>>>
>>>>Bob
>>>>
>>>>>If the LastKey() value before these lines was "ESC" or 27, then why on the WAIT line is it still 27? I thought the KEYBOARD command would overwrite that? Thanks!
>>>>>
>>>>>
>>>>>KEYBOARD '999' clear
>>>>>WAIT WINDOW TRANSFORM(LASTKEY()) NOWAIT
>>>>>
'If the people lead, the leaders will follow'
'War does not determine who is RIGHT, just who is LEFT'
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform