Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
LastKey() and KeyBoard command
Message
 
À
20/04/2007 11:36:23
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01218287
Message ID:
01218335
Vues:
17
Some of the old stuff can be tough without documentation on orphaned commands. Although they should put that this command has been replaced and is provided for backward compatibility, they should still include the help so you can determine what the code was trying to accomplish. This would have been very little effort since the help text already existed in older versions of Fox.

Bob

>It may be crap/old code, but I'm paying the bills again. Thanks!
>
>>Glad to help, also glad to see your working again.
>>
>>Bob
>>
>>>Bingo! Thanks!!
>>>
>>>
>>>IF LASTKEY() = 27
>>>	KEYBOARD '9' && Just to have something for INKEY to get
>>>	INKEY()
>>>ENDIF
>>>
>>>
>>>
>>>>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'
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform