Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can I represent keyboard macros as bar codes?
Message
De
14/11/2001 12:36:01
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
À
13/11/2001 11:14:55
Kenneth Downs
Secure Data Software, Inc.
New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de menu & Menus
Divers
Thread ID:
00580590
Message ID:
00581638
Vues:
17
>>
>>How about using your form's Keypress Event to capture those codes and then do your thing?
>
>Thanks, a good idea. I was able to trap the input and prevent the text from going into the textbox. However the keypress event traps only one key at a time and it is difficult to find a key to distuinguish between a scanned entry and a regular keyboard entry. Also, the CHR values have more than one representation (see the INKEY documentation). I think my best bet is to use a string identifier as my scanned 'code' and then to concatenate the string into a property character by character in the form's keypress event. When I have fully identified the scan code I can then take action. I'll try this. Thanks a lot.

Add a property to your form, like "expecting hotkey". Now in the keypress
...case nKeyCode=asc("@")   && say this is announces Alt
      nodefault
      thisform.ExpectingHotkey=.t.
   case thisform.expectingHotKey
      case inlist(nKeyCode, [list of acceptable ones])
         [activate whatever you need, based on the character]
         thisform.ExpectingHotkey=.f.
         nodefault
   case ...

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform