Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Inkey() value for dash (-) ???
Message
De
09/01/2002 21:09:53
 
 
À
09/01/2002 16:08:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00602652
Message ID:
00602812
Vues:
19
You better use
case nKeyCode=45
  thisform.Caption=thisform.Caption+"-"
because if you're debugging with the Debugger LastKey() won't have the value when it entered keypress event, instead nkeycode will have the correct value as it is one of the parameters that receives the value in the keypress event.

Luis


>It appears to work.....
>I did this:
>
>IF LASTKEY()=ASC('-')
> thisform.Caption=thisform.Caption+"-"
>ENDIF
>
>But, this works equally well
>
>case nKeyCode=45
> thisform.Caption=thisform.Caption+"-"
>
>Are you aware of any advantage of one over the other?
>
>Many thanks,
>Greg
>
>
>>It is 45. You can do ? INKEY(10) from the command window to verify.
>>
>>>I'm building an incremental search. One of the fields is an 18 character field that contains part numbers like 4505BCC5576-A11145. I can incrementally search until I hit the dash (-).
>>>
>>>Is there an inkey() value for the dash (-)?
>>>If not how can this be handled?
>>>
>>>I'm trapping the keys entered in the KeyPress event of this textbox and replacing the forms caption with the letters/numbers as they are entered, then using =seek to incrementally search.
>>>
>>>Many thanks,
>>>Greg
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform