>>i have a keypress event that i want to show message when user presses any alpha numeric including special characters.
>>
>>i tried trapping the esc, tab, all arrows, page down and up etc. but it's a bit tedious considering i have to trap all the function keys too.
>>
>>how do i do that? TIA
>
>hi Evelyn,
>
>For alphanumeric, you can use between().
>As to function keys and other special keys, they are the hardest part and have to be tested separately, which is normal since each one will require a distinct action
>
>Success,
>
>
>do case
>case ( inlist(nShiftAltCtrl, 0) and between(nKeyCode, asc('0'), asc('9')) ) ;
> or ( inlist(nShiftAltCtrl, 0) and between(nKeyCode, asc('a'), asc('z')) ) ;
> or ( inlist(nShiftAltCtrl, 1) and between(nKeyCode, asc('A'), asc('Z')) )
>
> acti screen
> ?'alphanum', chr(7)
>
>endcase
>
Thanks, this is useful.
For my task, though, using 'N' in InputMask will work.
If it's not broken, fix it until it is.
My Blog