Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP keyPress event and Grids
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00186518
Message ID:
00186578
Vues:
12
>In one of the cells in a grid i have made I want to add a special key.. that would cause a particular thing to happen.
>
>sort of like a hot key, but different.
>
>The key stroke sequence is CTRL+P
>Now reading the documentation, the nShiftAltCtrl=2 and the nKeyCode=16 for the above combination.
>
>I then added the following code to the KeyPress Event
>
>IF nShiftAltCtrl=2 and nKeyCode=16
> nodefault
> this.value=''
> thisform.GetNewPArt()
>ENDIF
> now, if I run it in the debugger everything happens as it should.. (i.e. I step through it.)
>
>but, Without the debugger... I can hit CTRL+P till I'm blue in the face and nothing happens...
>
>Any ideas,
>

In the KeyPress Event of what? You may have to place the code in the actual control such as the Text box of the grid column. If needed in multi columns, then add this method to your grid or form class, then call that method in the column textboxes or whatever controls you have in the columns.
Mark McCasland
Midlothian, TX USA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform