LPARAMETERS nKeyCode, nShiftAltCtrl * IF on an active object, and the object is the grid IF ; TYPE("ThisForm.ActiveControl") == "O" .AND. ; UPPER(ThisForm.ActiveControl.BaseClass) == "Grid" * IF the last key pressed was a cursor key, * display a MESSAGEBOX IF INLIST(LAST(), LeftArrow, RightArrow, LeftClick, Tab, Shift+Tab) MESSAGEBOX("You've Arrived!") *ThisForm.KeyPressCustomMethod ENDIF ENDIF>Chuck,
>IF TYPE("THISFORM.ActiveControl") == "O" AND UPPER(THISFORM.ActiveControl.BaseClass) == "GRID" >*-- If on an active object, and the object is the grid in myForm... > IF INLIST(LAST(), leftarrow, rightarrow... leftclick...) > *-- IF the last keys pressed were some of the cursor keys leftarrow, rightarrow... > *-- don't forget TAB, SHIFT+TAB as well... > chucks_keypressevent() && fire the new method we created > ENDIF >ENDIF >>