Information générale
Catégorie:
Codage, syntaxe et commandes
Nah,
I took out all the OKLs in favor of KEYPREVIEW and KEYPRESS... Here's another twist...
1 - From a menu, select Form A
2 - From form A, press F5 (Prompt) to display form B which has a grid on it: Form B's grid responds correctly to HOME ( GO TOP ) and END ( GO BOTTOM ). Form A stays open behind form B.
3 - From form B, highlight a row and press ENTER... this closes form B and passes the selected code back to form A
4 - Form A now displays the code which was selected in form B in a text box ( kind of like a combo box, but _no_ a combo box will not suffice. I need much more functionality than that )
3 - Press ENTER ( Ok ) to open form C which is a grid based on a cusror using the code from form A as a senior key, i.e. SELECT * FROM ChildFile WHERE JobID = THIS.txtJobID. !!!! THIS GRID IGNORES HOME AND END KEYS !!!!!
4 - Close all forms except form A
5 - From form A, press F5 (Prompt) to display form B which has a grid on it:
!!!! NOW THIS GRID IGNORES HOME AND END AS WELL !!!!
???? Both grid forms have KEYPREVIEW=.T. and the same code in their KEYPRESS methods.
What could possibly be happening on Form C to cause this?
Here's another mystery...
I put a WAIT WINDOW in the forms KEYPRESS method like this:
--------
CASE nKeyCode = K_CTL_HOME OR nKeyCode = K_HOME
wait window str( nKeyCode )
GO TOP
CASE nKeyCode = K_CTL_END OR nKeyCode = K_END
wait window str( nKeyCode )
GO BOTTOM
--------
These wait windows fire with CTL_HOME but *not* with HOME
I'm confused :(
Any help is GREATLY appreciated!
Thanks
>Works just fine for me. It returns 1, and 6 just as Marc said. Do you perhaps have an OKL defined for these keys?
>
>>I have KEYPREVIEW = .T. and I can capture various keys like PGUP, PGDN, CTL_HOME, etc...
>>
>>But when I press HOME or END, nothing happens... I've placed a WAIT WINDOW in the KEYPRESS event to verify this...
>>
>>Do I need to use ON KEY LABEL to capture HOME and END???? Why????
>>
>>Thanks
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement