>What might the code look like?
I tried the following for the "x" key, and it works as desired:
LPARAMETERS nKeyCode, nShiftAltCtrl
if nKeyCode = 120
ThisForm.lBarCode = .T.
NoDefault
endif
However, I don't find "~" in the table under inkey(); would it be possible to change to one of the symbols in the table?
For "~", the inkey() function (inserted in another textbox for debugging purposes) gives 126; according to the table that might conflict with Alt-7, but I don't think that would be much of an issue either. Alt-7 doesn't even trigger the KeyPress!
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)