Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Basic Grid Question...
Message
De
12/06/1998 10:05:36
Mark Hall
Independent Developer & Voip Specialist
Keston, Kent, Royaume Uni
 
 
À
12/06/1998 09:59:13
Calvin Smith
Wayne Reaves Computer Systems
Macon, Georgie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00107573
Message ID:
00107576
Vues:
25
>I have a form with entry fields at the top and a grid at the bottom. If the cursor in in the entry fields hitting the esc key closes the form and returns a record number to the calling form. If the cursor is in the grid I want hitting the esc key to set focus to the first entry field and if the enter key is hit while the cursor is in the grid I want the form to close and return a record number to the calling form.
>
>My problem- the form is intercepting keystrokes and I can't figure out a way to let the form keystroke method know that the grid has focus. The debugger wont tell me the value of _screen.activeform.activecontrol or any other property that I can think to evaluate. This is dumb, dumb. Help HELP HELP Please.
>
>Thanks
I made a simple test form with a couple of controls, set the forms KeyPreview property to .t. and put the following code in the Form.KeyPress event

LPARAMETERS nKeyCode, nShiftAltCtrl

IF NkeyCode = 27
WAIT WINDOW _SCreen.activeform.activecontrol.name
endif

DODEFAULT( nKeyCode, nShiftAltCtrl)

It seems to work OK?????
Regards
Mark

Microsoft VFP MCP
Menulib - OO Menus for VFP www.hidb.com/menulib
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform