Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
KeyPress Event don't work
Message
De
16/03/1999 04:21:30
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
16/03/1999 03:30:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00197956
Message ID:
00197964
Vues:
21
>I have added several method in a formset to do Add, delete ,.etc
>and I want to use KeyPress event to execute that method so I set the form's KeyPreview property to .T.
>
>I want to execute that method with Ctr + INSERT or Ctr + DELETE
>and many more
>
>But when the form is running and I press the keyboard with that combination Key,... the method doesn't work
>
>Then I tried other approach with ON KEY LABEL but it's not work either,...
>
>Anybody have suggestions,..?
>
>TIA

Set a breakpoint in the debugger just on the second line of your form.keypress, and see what keyboard codes you actually get. They may not be what you expect them, judging by the table in the help for InKey(). I've tried to trap for ctrl+k, and the keycode wasn't the expected 107 with nAltShiftCtrl of 2, it was 11,2. You could alternatively put one "Wait Window str(nKeyCode,3) time 3" instead of the breakpoint.

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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform