>Visual FoxPro 7.0 how do I retrieve nKeyCode for function key F2 and F10 in Keypress event.
Check for the second parameter (nShiftAltCtrl) = 0 and the first parameter (nKeyCode) = F1 = 31, F2 = -1, F3 = -2 ... F10 = -9.
Well, it's in VFP5 like this, I assume (and hope ;) in VFP7 the same.
HTH,